You shouldnt have to restart the whole container. Thats kind of heavy handed for adding an additional JSP/ESP for the error handling. AFAIK the JSP/ESP resolution for error handling is dynamic.
Your other question: yes, you must have 1 jsp/esp for each and every error code. Unfortunately UNLIKE creating a Throwable.jsp that will handle all Exceptions, you cannot create a 400.jsp to handle all 4xx error codes. Just as a experiment, you could try creating a 4xx.jsp (or esp) and see if it will handle all the 4xx error codes. I would be interested in your results. If not, then I would consider trying a similar thing to what I have done with my handling of the 302 (Temporarily Moved). I created a Filter to watch for this situation. It actually requires creating a ResponseWrapper to do the handling. Email me again if you want the full details --Mike On Thu, Jul 29, 2010 at 8:57 PM, Fabrizio Scarcello [via Apache Sling] < [email protected]<ml-node%[email protected]> > wrote: > Hi, > thank you very much, i understand what you are pointing out. > I was already considering that in my scripts (as described, i put also the > Throwable.esp script in the errorhandler directory), but maybe i was doing > something wrong, or i had some other problem... today i re-checked it, and > magically it works (!), so excuse me for this part of the question... > (maybe > i didn't just restart the J2ee container? Perhpas it's required for the > modifications to take effect...) :-) > Anyway, just to understand: can i handle all 40(X) error codes with the > 400.esp script, or i have to put a script for each error code? If i put a > script 404.esp it's invoked; but if i put a 400.esp script (and remove the > 404.esp script) it's not invoked... am i misunderstanding this behaviour? > > Thank you, > Fabrizio. > > Actually, this will be a better guide than anything I stated above: > > > > > > > http://sling.apache.org/site/errorhandling.html#Errorhandling-UncaughtThrowables > > -- > > View this message in context: > > > http://apache-sling.73963.n3.nabble.com/Default-error-handling-tp992189p1003238.html<http://apache-sling.73963.n3.nabble.com/Default-error-handling-tp992189p1003238.html?by-user=t> > > Sent from the Sling - Users mailing list archive at Nabble.com. > > > > > ------------------------------ > View message @ > http://apache-sling.73963.n3.nabble.com/Default-error-handling-tp992189p1006740.html > To unsubscribe from Re: Default error handling, click > here<http://apache-sling.73963.n3.nabble.com/subscriptions/Unsubscribe.jtp?code=bWoua2VsbGVoZXJAZ21haWwuY29tfDEwMDMyMzh8LTE2MzE0MjY5NjQ=>. > > > -- View this message in context: http://apache-sling.73963.n3.nabble.com/Default-error-handling-tp992189p1007812.html Sent from the Sling - Users mailing list archive at Nabble.com.
