The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的解决方法
来源:互联网 发布:创建windows应用程序 编辑:程序博客网 时间:2024/05/21 21:52
最近又开始看jsp,那时候用的tomcat还是5的版本,我现在自己下的用的是tomcat6,在运行随书光盘的例子的时候,报了这样的错误:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
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:
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:589)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.24 logs.
Apache Tomcat/6.0.24
后来在网上查了查,说是因为项目中有像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的解决方法 最近又开始
- 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最新处理方法
- 用tomcat发布,无法解析jsp,The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory
- 天声人語 20160124 逆石油ショック
- 七步精通Python机器学习
- Numpy攻略系列:repeat函数
- 求方差时为什么要除以N—1,而不是除以N!【通俗理解-非数学专业】
- 日经春秋 20160124
- The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory的解决方法
- MySQL语句规范与基本操作
- Python官方教程 The Python Tutorial
- 企业项目化管理【一】:项目管理软件选型指南
- 2016蓝桥杯假期任务之《大衍数列》
- POJ 1258(最小生成树之Kruskal)
- 判断任意两台计算机的IP地址是否属于同一子网络的两种地址转换方法
- Flex xml编辑器(老外写的)
- [转]Linux下卸载Source Insight 和wine的方法