惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Cisco Blogs
Schneier on Security
Schneier on Security
T
Tor Project blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tenable Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Threat Research - Cisco Blogs
C
CERT Recently Published Vulnerability Notes
Security Latest
Security Latest
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
NISL@THU
NISL@THU
L
Lohrmann on Cybersecurity
Scott Helme
Scott Helme
Webroot Blog
Webroot Blog
Project Zero
Project Zero
Google Online Security Blog
Google Online Security Blog
The Last Watchdog
The Last Watchdog
Spread Privacy
Spread Privacy
Hacker News: Ask HN
Hacker News: Ask HN
PCI Perspectives
PCI Perspectives
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
W
WeLiveSecurity
Attack and Defense Labs
Attack and Defense Labs
D
Darknet – Hacking Tools, Hacker News & Cyber Security
N
News | PayPal Newsroom
Help Net Security
Help Net Security
The Hacker News
The Hacker News
H
Heimdal Security Blog
O
OpenAI News
S
Security @ Cisco Blogs
N
News and Events Feed by Topic
Cyberwarzone
Cyberwarzone
Simon Willison's Weblog
Simon Willison's Weblog
G
GRAHAM CLULEY
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园 - 叶小钗
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
Tailwind CSS Blog
大猫的无限游戏
大猫的无限游戏
A
Arctic Wolf
I
Intezer
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
S
Security Affairs
P
Proofpoint News Feed
S
Secure Thoughts
腾讯CDC
Google DeepMind News
Google DeepMind News
量子位
罗磊的独立博客

博客园 - bluesky4485

Elasticsearch及java客户端jest使用 在windows环境下基于sublime text3的node.js开发环境搭建 CentOS6.4安装及配置oracle Ant学习 Springframework3.1源码编译 如何测试java支持的最大内存 win7x64下安装oraclex64版本后,plsql Developer无法登录的问题 VMWare安装redhat9后上网的的问题 MyEclipse10 中增加svn插件 Oracle连接池信息的修改 OPDS1.1 VMware下Redhat9鼠标选用usb后不能使用的解决办法 m2e插件安装 Java开发Maven环境配置和介绍 javadoc生成出现错误“编码 GBK 的不可映射字符” Google常用搜索技巧 设置Google不跳转到google.com.hk CodeSmith支持中文配置 jni和C++通信中文乱码的问题
Tomcat中部署后JspFactory报异常的解决方案
bluesky4485 · 2012-05-25 · via 博客园 - bluesky4485

The method getJspApplicationContext(ServletContext) is undefined for the type

JspFactory的异常的原因及解决办法原因:

是由于工程的WEB-INF/lib下存在jsp-api.jar、servlet-api.jar,与Tomcat自带的jar包冲突造成的。

解决办法:

删除WEB工程Lib目录中的jsp-api.jar、servlet-api.jar,重新启动Tomcat服务问题解决.

在创建工程时,jsp-api.jar、servlet-api.jar这两个jar包都无需手工加入到web工程中,Tomcat中都已包含。

异常信息如下:
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:423)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
        org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

所以在Tomcat中进行部署时,Tomcat中已经有的jar,工程中就不需要再包含了,以免发生冲突。