gpt4 book ai didi

javax.servlet.ServletException : java. lang.NoClassDefFoundError:JspException

转载 作者:行者123 更新时间:2023-11-28 22:13:27 25 4
gpt4 key购买 nike

我有以下代码:

RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(address);
dispatcher.forward(req,res);

此代码的第二行产生标题中的错误。这是我的库:​​

enter image description here

这是我的 pom.xml:

<dependencies>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-servlet-api</artifactId>
<version>7.0.39</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-api</artifactId>
<version>7.0.39</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-catalina</artifactId>
<version>7.0.39</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-el-api</artifactId>
<version>7.0.30</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jasper-el</artifactId>
<version>7.0.30</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>db2jcc</artifactId>
<version>3.59.81</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>db2jcc_license_cu</artifactId>
<version>3.59.81</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>db2jcc_license_cisuz</artifactId>
<version>3.59.81</version>
<scope>provided</scope>
</dependency>

</dependencies>

这是堆栈跟踪:

java.lang.NoClassDefFoundError: JspException
java.lang.Class.getDeclaredMethods0(Native Method)
java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
java.lang.Class.privateGetPublicMethods(Class.java:2651)
java.lang.Class.getMethods(Class.java:1467)
java.beans.Introspector.getPublicDeclaredMethods(Introspector.java:1280)
java.beans.Introspector.getTargetMethodInfo(Introspector.java:1141)
java.beans.Introspector.getBeanInfo(Introspector.java:416)
java.beans.Introspector.getBeanInfo(Introspector.java:163)
org.apache.jasper.compiler.Generator$TagHandlerInfo.<init>(Generator.java:3957)
org.apache.jasper.compiler.Generator$GenerateVisitor.getTagHandlerInfo(Generator.java:2212)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1643)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1773)
org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)
org.apache.jasper.compiler.Node$Root.accept(Node.java:475)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2452)
org.apache.jasper.compiler.Node$IncludeDirective.accept(Node.java:639)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)
org.apache.jasper.compiler.Node$Root.accept(Node.java:475)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Generator.generate(Generator.java:3503)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:250)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
MT_Servlet.gotoPage(MT_Servlet.java:160)
MT_TasEntryServlet.doPost(MT_TasEntryServlet.java:1562)
MT_TasEntryServlet.doGet(MT_TasEntryServlet.java:45)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
MT_Servlet.gotoPage(MT_Servlet.java:160)
MT_TBLServletController.doPost(MT_TBLServletController.java:217)
MT_TBLServletController.doGet(MT_TBLServletController.java:31)
javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

有人看到这个问题吗?

最佳答案

javax.servlet.JspException 包含在 jsp-api.jar 中(您还可以找到包含 jars here )。有关更多信息,请查看 this answer .

关于javax.servlet.ServletException : java. lang.NoClassDefFoundError:JspException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19503779/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com