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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top