10

Servlet 3.0 allows for programmatic configuration of servlets, filters and listeners. But what about error pages?

I can't see that there's any methods for doing that in ServletContext.

It would be nice to be able to completely abolish the web.xml.

Tomasz Nurkiewicz
  • 334,321
  • 69
  • 703
  • 674
Henrik Barratt Due
  • 5,614
  • 1
  • 21
  • 22
  • 1
    There are indeed none. Just post a feature request against the [servlet spec](http://java.net/jira/browse/SERVLET_SPEC) if you think that it's mandatory. – BalusC Jan 06 '12 at 13:42

1 Answers1

3

There is no technical way one can programmatically add such a definition.

Łukasz Rżanek
  • 5,786
  • 27
  • 37