I tried to use a new servlet 3.0 feature with jetty maven plugin.
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.5.v20120716</version>
</plugin>
part of my web.xml
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
...
<error-page>
<location>/info/error</location>
</error-page>
</web-app>
In my understanding you can set a default error page in servlet 3.0. When I test this with mvn jetty:run
and an arbitrary exception it does not work. Jetty shows just the stacktrace as it would do without the error-page
configuration. When I run it with tomcat7:run
it does work.
I searched eclipse bug database and jetty documentation but haven't found any information about this.
Can somebody confirm this is a bug in jetty?