开发者

JSP compilation error For IBM JDK 1.5 Servlet version 2.5 [duplicate]

开发者 https://www.devze.com 2023-04-05 22:14 出处:网络
This question already has answers here: The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
This question already has answers here: The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory (4 answers) Closed 6 years ago.

I'm using IBM JDK and Eclipse Hellos. When I'm devloping simple web project, I'm getting error in compilation of jsp page. If I change my JDK to normal Sun JDK, then every thing's working fine. But I have to use IBM jdk as production environment; I have to use web sphere.

The error I'm getting is this:

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

An error occurred at line: 22 in the generated Java file 

The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory

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:334)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
    org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
    org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

Can anyone tell me what I have to do?


The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory - this means that JspFactory on the classpath does not have the desired method. The method is available since version 2.1 of the servlet api, so make sure you don't have any servlet-api, jsp-api or el-api in WEB-INF/lib, and that your WebSphere supports Servlet 2.1.

0

精彩评论

暂无评论...
验证码 换一张
取 消