-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Justin,

On 4/13/2011 9:17 AM, Justin Randall wrote:
> Hi Chris,
> 
> I'm assuming the servlet is in control of generating all of the
> errors you are implying?

Yes and no:

> For example, if the servlet doesn't load properly and a 404 would be
> generated, the servlet would obviously not be in control of handling
> this exception and this would would have to make use of <error-page>
> directives in web.xml, specifically for <error-code> 404 which would
> redirect to a JSP that just so happens to be an XML file.

Right, but I want the default 404 error page to be in HTML.

Basically, I want two defaults.

If the servlet spec allowed for <error-page> to include a <servlet-name>
filter, that's what I would use. But it doesn't :(

> If I've understood what you're looking for correctly I've worked on
> similar projects in the past and what's worked well for me is
> leveraging MVC by using the RequestDispatcher to forward to relevant
> JSPs which happen to all be XML files with the contents populated
> either via JSP tags or EL.  This way you can catch the
> exceptions/error conditions in your servlet, set the appropriate
> exception information within the request context and the dispatch to
> the correct JSP XML page.

Of course. I was wondering about other exceptions or errors that maybe I
cannot control from that code.

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2mA10ACgkQ9CaO5/Lv0PAvMgCgqk4ZiH5b75jrl25Kq73Po3hq
qCIAniutff9LdBlxKTUya36QdWp9e+eL
=j2iW
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to