[英]Unable to deploy eclipse exported war file
我有一个应用程序,我在 Eclipse 中的 Tomcat 中成功运行,但是当我尝试将它部署到外部 tomcat 时,它抛出以下异常
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generating servlet error:
[antlib:org.apache.tools.ant] Could not load definitions from resource org/apache/tools/ant/antlib.xml. It could not be found.
似乎这在运行时需要一些 Tomcat 无法提供的 tools.jar。
注意:我已经从 Eclipse 导出了相同的war
,并尝试使用 Maven 构建它
我不知道 Eclipse 是如何管理这个的。 部署在外部 Tomcat 上时如何使其工作?
您有 servlet-api.jar 错误。
你能做什么?
如果您没有将此依赖项添加到您的 pom.xml;
<dependency> <groupId>javax.servlet</groupId> <artifactId>jsp-api</artifactId> <version>2.0</version> <scope>provided</scope>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.