• Java项目,更改项目名称后出现了一些异常,找了很久没找着原因,百度上
  • java

改了一次项目名称,该名称之前运行没有问题,改了之后发生的异常。
1.在首页点击‘系统简介’后无法跳转过去

显示页面空白

2.先点击‘房源展示’,然后再点击‘系统简介’就可以正常跳转过去。

3.控制台报异常,但是代码之前运行的没问题,这里也没改过,只改了项目名称相关的地方。

select distinct(leibie) as ss from xinwengonggao
select * from fangyuanxinxi where fangwuzhaopian<>'' order by id desc
select * from xinwengonggao where leibie='新闻公告' order by id desc
select distinct(leibie) as ss from xinwengonggao
2020-4-24 23:00:59 org.apache.catalina.core.ApplicationContext log
信息: An exception occurred processing JSP page /dx_detail.jsp at line 37

34:  <div align="center" style="color:#000000">
35:          
36:           <%
37:     HashMap m = new CommDAO().getmaps("leibie",lb,"dx");
38:      %>
39:                                   <table width="1114" height="430" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FA8A89" class="newsline" style="border-collapse:collapse">
40:                                     <tr>


Stacktrace:
select distinct(leibie) as ss from xinwengonggao
select * from fangyuanxinxi where 1=1 order by id desc
select * from fangyuanxinxi where 1=1 order by id desc
select distinct(leibie) as ss from xinwengonggao

4.在首页第一次点击‘新闻公告’会有乱码,再次或者多次点击就显示正常了。

点第一次出现乱码。

之后就正常了。

执行的语句是一样的,但是第一次会有乱码后面则正常。

Stacktrace:
select distinct(leibie) as ss from xinwengonggao
select * from fangyuanxinxi where 1=1 order by id desc
select * from fangyuanxinxi where 1=1 order by id desc
select distinct(leibie) as ss from xinwengonggao
select distinct(leibie) as ss from xinwengonggao
select * from xinwengonggao where leibie='新闻公告'  order by id desc
select * from xinwengonggao where leibie='新闻公告'  order by id desc
select distinct(leibie) as ss from xinwengonggao
select * from fangyuanxinxi where fangwuzhaopian<>'' order by id desc
select * from xinwengonggao where leibie='新闻公告' order by id desc
select distinct(leibie) as ss from xinwengonggao
select * from xinwengonggao where leibie='?伴????'  order by id desc
select * from xinwengonggao where leibie='?伴????'  order by id desc
select distinct(leibie) as ss from xinwengonggao
select * from xinwengonggao where leibie='新闻公告'  order by id desc
select * from xinwengonggao where leibie='新闻公告'  order by id desc

相关代码如下:

<div class="section">
 <div class="kcBox clear-fix">
   <div class="knowList clear-fix">
     <div class="Ttitle">新闻公告<span>News</span>

     </div>
     <!-- end Ttitle-->
     <ul class="knowListUl">
     <%

   for(HashMap map:new CommDAO().select("select * from xinwengonggao where leibie='新闻公告' order by id desc ",1,4)){

    %>
             <li><a href="gg_detail.jsp?id=<%=map.get("id")%>"><%=Info.ensubStr(map.get("biaoti"),24)%></a><span><%=map.get("addtime").toString().substring(0,10) %></span> </li>
              <%
                           }
                           %>
<div  class="navgrp">
   <ul class="nav" id="nav">
     <li class="cur"><a href="index.jsp">网站首页</a></li>
     <li><a href="dx_detail.jsp?lb=系统简介">系统简介</a> </li>
     </li>
     <li><a href="fangyuanxinxilisttp.jsp">房源展示</a> </li>
     <li><a href="news.jsp?lb=新闻公告">新闻公告</a>
    </li>
     <li><a href="lyblist.jsp">在线留言</a> </li>
     <li><a href="userreg.jsp">用户注册</a>
    <li><a href="login.jsp">后台管理</a> </li>
   </ul>
 </div>
<%@ include file="qttop.jsp"%>
<div class="section ">
 <div class="TtitleBox">
   <div class="Ttitle"><%=lb%><span>Service items</span>
     <div class="Tmore"> </div>
   </div>
   <!-- end Ttitle-->

 </div>
 <!-- end TtitleBox-->
<div align="center" style="color:#000000">

         <%
   HashMap m = new CommDAO().getmaps("leibie",lb,"dx");
    %>
                                 <table width="1114" height="430" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FA8A89" class="newsline" style="border-collapse:collapse">
                                   <tr>
                                     <td height="357" align="left"><font color="000000"><%=m.get("content") %></font></td>
                                   </tr>
                                   <tr>
                                     <td height="33" align="right"><input type="button" name="Submit5" value="返回" onClick="javascript:history.back();" ></td>
                                   </tr>
  </table>

</div>


  • 就几件    2020-04-26 10:59:33
  • 阅读 1004    收藏 0    回答 1
  • 邀请
  • 收藏
  • 分享
发送
登录 后发表评论
  • 51testing软件测试圈微信