Stefan AUFISCHER wrote: > > In my Servlet I need to decide (based on the type of exception that > occured) whether I will forward to an error page defined in web.xml > or to an error page that is provided by the servlet itself. > > Is there any standard way to access the error pages defined in web.xml? >
Probably not in the way you mean. There's no javax.servlet* API that gives you the information directly. You could open up web.xml yourself (your servlet has access to it through ServletContext.getResource*) and parse the XML, looking for <error-page> elements. That should probably be portable, but it's kind of ugly. Easier would be to require that whoever sets up web.xml also set up some <context-param>s that tell which error-pages are declared. -- Christopher St. John [EMAIL PROTECTED] DistribuTopia http://www.distributopia.com ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html