The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory 错误的解决
来源:互联网 发布:pi实时数据库 编辑:程序博客网 时间:2024/05/16 14:44
最近在弄osworkflow,从网上下载了一个例子运行时报了如下错误,用的是tomcat6,
org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 23 in the generated java file
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:589)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.opensymphony.filter.EncodingFilter.doFilter(EncodingFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
后来在网上查了查,说是因为项目中有像jsp-api.jar servlet-api.jar跟tomcat6的lib中同样的包,但版本比tomcat6的版本要低,在运行的时候,因为会优先加载项目中的包,所以 产生了错误,把项目中和tomcat相同的包删除(必须删除,如果替换还会产生其他的错误),问题就可以解决了。
实际通过这个问题,则可以明白,在布署jsp网站(在tomcat上)的时候,项目中的jar包不能有和tomcat的lib中相同的包(自己包的版本比 tomcat低或相同),否则会因为先加载自己项目中的包而导致程序错误。所以在有相包的情况的时候,将自己的包给删掉,就不会出现问题了。
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory 错误的解决
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory!
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
- 错误: The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
- JSP错误:The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory问题查找及解决
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的异常的原因及解决办法
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的异常的原因及解决办法
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory非包冲突的解决方法
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的解决方法
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的解决方法
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的解决方法
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的解决方法
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的解决方法 最近又开始
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的解决方法
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的解决方法
- [JavaScript]OO编程之自定义方法
- Hibernate三种状态的区分,以及save,update,saveOrUpdate,merge等的使用
- DBCC 常用命令解析
- 一个简单的JAVA线程池实例
- C++面试题
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory 错误的解决
- linux下压缩解压缩
- 空间变换理论
- Swing:支持自动过滤的 JComboBox
- sql server中like无法匹配下划线问题解决方案
- 检测点9.3
- 关于魔兽CTM补丁太大,安装不下的问题的解决方案
- 配置FreeImage静态库
- VS2005无法创建智能手机工程的解决办法