小弟有JSP问题请教,急 在线等
JSP在上传和下载文件时候抛出这个异常:
所有的组件是jspsmartupload.jar
已经加到Tomcat 5.5\webapps\项目名\WEB-INF\lib
和Tomcat 5.5\common\lib下了
Tomcat 5.5\common\lib下已经有servet-api包
HTTP Status 500 -
--------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: javax/servlet/ServletRequest
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:272)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NoClassDefFoundError: javax/servlet/ServletRequest
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
java.lang.Class.getConstructor0(Unknown Source)
java.lang.Class.getConstructor(Unknown Source)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1164)
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
org.apache.jasper.compiler.Generator.generate(Generator.java:3305)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:303)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
--------------------------------------------
Apache Tomcat/5.5.17
------解决方案--------------------java.lang.
NoClassDefFoundError: javax/servlet/ServletRequest
检查下是否将servlet-api.jar放在web-inf/lib下
------解决方案--------------------帮顶
我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.aiyiweb.com/java-web/317.html