MyException - 我的异常网
当前位置:我的异常网» Java Web开发 » JSP异常

JSP异常

www.MyException.Cn  网友分享于:2013-09-12  浏览:16次
JSP错误!
HTTP   Status   500   -  

--------------------------------------------

type   Exception   report

message  

description   The   server   encountered   an   internal   error   ()   that   prevented   it   from   fulfilling   this   request.

exception  

org.apache.jasper.JasperException:   Unable   to   compile   class   for   JSP

Generated   servlet   error:
E:\Program   Files\Apache   Software   Foundation\Tomcat   5.0\work\Catalina\localhost\myapp\org\apache\jsp\TestBean_jsp.java:6:   软件包   test   不存在
import   test.TestBean;
                        ^


An   error   occurred   at   line:   3   in   the   jsp   file:   /TestBean.jsp
Generated   servlet   error:
E:\Program   Files\Apache   Software   Foundation\Tomcat   5.0\work\Catalina\localhost\myapp\org\apache\jsp\TestBean_jsp.java:46:   找不到符号
符号:   类   TestBean
位置:   类   org.apache.jsp.TestBean_jsp
TestBean   testBean=new   TestBean( "This   is   a   test   java   bean. ");
^


An   error   occurred   at   line:   3   in   the   jsp   file:   /TestBean.jsp
Generated   servlet   error:
E:\Program   Files\Apache   Software   Foundation\Tomcat   5.0\work\Catalina\localhost\myapp\org\apache\jsp\TestBean_jsp.java:46:   找不到符号
符号:   类   TestBean
位置:   类   org.apache.jsp.TestBean_jsp
TestBean   testBean=new   TestBean( "This   is   a   test   java   bean. ");
                                            ^
3   错误


org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note   The   full   stack   trace   of   the   root   cause   is   available   in   the   Apache   Tomcat/5.0.28   logs.


=========================================================

Tomcat好像找不到我编写的JAVA   BEAN?!另外,我的应用程序放在webapps下的myapp,而且WEB-INF和web.xml都有,在WEB-INF也建了class目录,但是还是找不到我的JAVA   BEAN呢?



------解决方案--------------------
bean类需要放在包下

如:
package myjavabean;

class javabean {
...
}
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.myexception.cn/java-web/317.html
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.myexception.cn/j2ee/2308.html

文章评论

软件开发程序错误异常ExceptionCopyright © 2009-2015 MyException 版权所有