`
fujinbing
  • 浏览: 232888 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

jsp页面编译报错的可能问题

阅读更多

推荐一些不错的电子书:http://www.memeshu.com

今天写一个jsp 页面
但编译时报错

Caused by: com.caucho.java.JavaCompileException: /WEB-INF/jsp/noresult.jsp:1: ? _jspService(javax.servlet.http.HttpServletRequest,ja
vax.servlet.http.HttpServletResponse) -?I esid
      try {     String esid=(String)request.getAttribute("esid");
                       ^
1 ?
        at com.caucho.java.InternalCompiler.executeInt(InternalCompiler.java:243)
        at com.caucho.java.InternalCompiler.compileInt(InternalCompiler.java:96)
        at com.caucho.java.AbstractJavaCompiler.run(AbstractJavaCompiler.java:102)

原页面


<%@ include file="/WEB-INF/jsp/include/search_word.jsp"%>
<%
String esid=(String)request.getAttribute("esid");
try {
%>


检查好就都没有发现结果
只能一行一行去,看看有什么结果

发现 去掉 <%@ include file="/WEB-INF/jsp/include/search_word.jsp"%>以后 编译通过那问题就一定出现在 search_word.jsp 页面了

查看 search_word.jsp页面内容

<%
String esid = (String) request.getAttribute("esid");
String word=com.easou.novelsearch.web.util.Utility.getSearchWord(esid+"_sw");
if(word==null)
{word="";}
request.setAttribute("rwords",word);
%>
问题找到了,重复定义了变量 esid

jsp中重复定义变量很难查找,尤其是页面嵌套比较多时

0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics