dbx。。。 2020-04-24 23:26 采纳率: 100%
浏览 337
已采纳

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>
  • 写回答

2条回答 默认 最新

  • 毕小宝 博客专家认证 2020-04-25 09:13
    关注

    这个问题太长了,看不到源码不好排查:
    1、修改项目名称,但是没有改项目发布名称的话,不会影响页面功能的。
    2、需要定位你有问题的连接,看看真正的请求路径是什么,页面是怎么写的。
    3、页面乱码问题:大概率可能是页面参数编码没有转码。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误