Does anyone know any sane reason for such bundling decision? Google engineers act wisely in most cases, so this kinda surprized me.
This would cause collisions with other versions of servlet API pulled via Maven dependencies:
- webapp classpath will likely contain
version which is bundled with GWT; - container may refuse to load the GWT
jar as it contains the javax.servlet
package; - in most cases this will
likely deviate classpaths across your
IDE’s debugger and the really
executing VM.
Link to the jar in question (just so you see the same thing after unzipping as I do, if you don’t believe that GWT contains servlet API classes in the same jar):
http://repo1.maven.org/maven2/com/google/gwt/gwt-user/1.7.0/gwt-user-1.7.0.jar
You shouldn’t be including gwt-dev.jar or gwt-user.jar in your war file. You only need gwt-servlet.jar in your war, and that too only if you are using RPC. If you notice, gwt-servlet.jar (ironically) does not contain any of the servlet classes.