[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: Major problem using error-page element in web.xml
do-not-reply at jboss.com
Mon Feb 5 01:36:10 EST 2007
Here's some more information about my issue -
I've determined that the problem occurs when a request for a document in a non-existent directory is received, and replaced with /default.jsp.
Default.jsp contains relative references to a CSS file and some image files. When the browser tries to get these, it tries to get them out of the non-existent directory specified in the original URL; this is when the exceptions occur in the log.
I would guess that what is happening is this:
(a) The browser tries to retrieve the image from the bad URL;
(b) The server starts serving up the default.jsp page instead;
(c) The browser sees that it's getting HTML instead of an image, and closes its socket;
(d) The server gets an exception while trying to write to the socket, and in doing so, fails to release some resource.
Changing the references in default.jsp to absolute references does prevent the problem from occuring regularly. Still, if this is really what is happening, it's very troubling. There are lots of other ways sockets can close early, not to mention the potential for someone to write a program specifically to exploit the problem.
In fact, a check of my logs shows that I'm still getting the exception but in much smaller numbers. Probably because web pages unknown to me are linking to bad images (there was an old web site at the same domain name for many years, hence the need for the 404 redirect).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4011157#4011157
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4011157
More information about the jboss-user