Is Jetty Compatible with Tomcat
YES!
Jetty is implemented to the same servlet specification to tomcat 3.x and
accepts the same web application configuration files. For JSP, jetty
uses the jasper code from the Jakarta project.
Jetty is tested against the Jakarta watchdog servlet test suite and
currently passes 205 and fails 3 tests. The 3 failed tests are
probably due to errors in the watchdog suite against the spec:
Get Context Test: This test fails as watchdog attempts to get
a context using a path within the context, rather than an absolute context.
The specification clearly states that the URI should be absolute.
Get Request Dispatcher Test: This test fails due to an apparent
naming error in watchdog, where 'Test' has been left off the URI of
the requested dispatcher.
Get Path Translated Test: This test fails as Jetty runs WAR files
in a packed form, thus there are no file paths available.
The getResource API work for compressed WAR files. If the WAR file
is unpacked, Jetty passes this test.
The Jetty server itself is configured differently to tomcat, so it
does not accept tomcat server.xml files.
Return to JettyFaq