tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: c:import doesn't work right with HEAD requests
Date Sun, 18 Dec 2005 23:20:09 GMT

<erh@swapsimple.com> wrote in message 
news:20051218224430.GB19379@poe.swapsimple.com...
> On Sun, Dec 18, 2005 at 12:26:07PM -0800, Hassan Schroeder wrote:

> My guess is that tomcat uses a "HEAD" request to retrieve content with
> c:import if the request for the jsp page containing the c:import was
> requested with a "HEAD" request.  I'm not familiar enough with the tomcat
> code to easily figure out whether this is actually the case or not.

Actually, it JSTL rather than Tomcat, but you're basically correct, that is 
what is happening.  It could be fixed in c:import (to wrap the Request, and 
report GET for HEAD), but that is outside of Tomcat.

> If that's really what's happening, then I think it's wrong.  When a HEAD
> request is received, the jsp page should either:
> 1) run exactly the same as if a GET request was received

This is outside of Tomcat's control, since any Servlet is free to override 
doHead to do anything it wants ;-).  In fact, this is one work-around for 
your problem:  Use extends="com.myfirm.mypackage.MyJSPPage", and implement 
doHead there.

> 1a) unless the jsp page _explicitly_ checks the request method
>     with ${request.method} or equivalent.

Checking this is probably the easiest work-around.  It's very unlikely that 
Tomcat could do it relyably.

> 2) not run at all
>
That would violate the spec.

> eric 




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


Mime
View raw message