问题
I'm trying to deploy my GWT project in Tomcat but i'm always getting this error:
Jul 16, 2013 9:16:52 PM org.apache.catalina.loader.WebappClassLoader validateJarFile
INFO: validateJarFile(C:\Users\Dennis\Documents\workspaceMA\xampp\tomcat\webapps\rfds\WEB-INF\lib\gwt-dev.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
When i'm trying to open the webpage i get following error:
HTTP Status 404 - /rfds/
type Status report
message /rfds/
description The requested resource is not available.
Apache Tomcat/7.0.41
After searching these jar files in mit web-inf/lib directory i found a gwt-dev.jar (about 33Mb) and a gwt-servlet.jar (about 6Mb) and about 10-20 other jar files regarding other tools i used in my project (membrain, drools, jdbc driver etc.). Do I have dependency issues? Has someone an solution for this problem?
Thanks in advance!
回答1:
Thou shall never deploy gwt-user.jar
and/or gwt-dev.jar
!
Deploy gwt-servlet.jar
if you use GWT-RPC or RequestFactory. If you're not using managed dependencies (Maven, etc.) you might have to deploy gwt-servlet-deps.jar
too, which you'll find in the GWT SDK zip bundle. Otherwise, your dependency manager (Maven, etc.) should take care of transitive dependencies fro you.
If you use managed dependencies, put gwt-user
and gwt-dev
in the provided
scope (or whatever is equivalent for your build tool / dependency manager if you're not using Maven).
See http://www.gwtproject.org/doc/latest/DevGuideDeploying.html#DevGuideDeployingServletContainerUsingRPC
来源:https://stackoverflow.com/questions/17678410/trying-to-deploy-gwt-project-in-tomcat-ends-with-offending-class-error