首页上一页 1 下一页尾页 1 条记录 1/1页
Unable to compile class for JSP:
发表在JavaWeb图书答疑
2010-05-02
是否精华
是
否
版块置顶:
是
否
这是 书上的原码,可是为什么我在浏览器里面会出现错误呢<%String sessionMessage="session 练习 ";
session.setAttribute("message",sessionMessage);
out.print("保存在session范围内的对象是:"+sessionmessage);
错误提示
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 13 in the jsp file: /index.jsp
sessionmessage cannot be resolved
10: <body>
11: <%String sessionMessage="session 练习 ";
12: session.setAttribute("message",sessionMessage);
13: out.print("保存在session范围内的对象是:"+sessionmessage);
14:
15: %>
16: </body>
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:349)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:327)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
谢谢你们指教一下了