我有这个错误:
Caused by: org.apache.tomee.catalina.TomEERuntimeException: org.apache.openejb.OpenEJBException: Unable to load servlet class: org.apache.jsp.versionMessage_jsp: org.apache.jsp.versionMessage_jsp
at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:1924)
at org.apache.openejb.config.AnnotationDeployer$ProcessAnnotatedBeans.deploy(AnnotationDeployer.java:1691)
at org.apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeployer.java:336)
at org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:363)
at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:850)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:881)
... 17 more
Caused by: java.lang.ClassNotFoundException: org.apache.jsp.versionMessage_jsp
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:94)
at org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:67)
这个设置:
1. versionMessage.jsp 通过 org.apache.jasper.JspC 预编译
2. web.xml 声明如下:
<servlet>
<servlet-name>org.apache.jsp.versionMessage_jsp</servlet-name>
<servlet-class>org.apache.jsp.versionMessage_jsp</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>org.apache.jsp.versionMessage_jsp</servlet-name>
<url-pattern>/versionMessage.jsp</url-pattern>
</servlet-mapping>
- 如果我不预编译,只是原始的jsp包含在战争中,没有问题。
我会错过什么?