You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2007/01/18 22:42:41 UTC

Re: JSP suddenly causing problems [fixed -- still have questions]

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

All,

It turns out that my problem had to do with my altered deployment: a
properties file was not being copied into the right place, and my JSP's
init() method required that properties file to exist.

My servlet's init method, in this case, would have been throwing an
UnavailableException -- I catch all Exceptions in init and re-throw them
wrapped in an UnavailableException.

I would have expected to get my code's exception stack trace
/somewhere/, but didn't.

Looking at the source at
http://svn.apache.org/repos/asf/tomcat/jasper/tags/tc4.1.x/TOMCAT_4_1_31/jasper2/src/share/org/apache/jasper/servlet/JspServletWrapper.java

I can see that UnavailableException thrown from
JspServletWrapper.getServlet(), which is calling
theServlet.init(config), will jump out of getServlet back into
JspServletWrapper.service, which catches UnavailableException and
attempts (apparently, in this case) to return a "service unavailable"
HTTP status code.

For some reason, the response has already been committed (strange, as no
output whatsoever has been generated) and I end up getting this
exception. The result is that my exception and the stack trace are
swallowed.

Any ideas as to how my response could have been committed before
generating any output? I realize that my problem has been resolved and I
should probably be thankful for that, but I'm interested in what could
have caused this odd set of circumstances.

- -chris

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

iD4DBQFFr+nR9CaO5/Lv0PARAgKXAJd0NQ1u3cQYsxOYVhRZlcxTO5UyAKCPV4b/
3LrHRcvVE/sp5BbOMHR//Q==
=IsXl
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org