tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: HelloWorld servlet, or just about
Date Fri, 19 Dec 2008 23:07:23 GMT
André Warnier wrote:
> Peter_Ford@blm.gov wrote:
>> Actually this is very easy; when you want to pass the request down the
>> chain (i.e. into the servlet) you call the chain.doFilter() method. When
>> you *don't* want the request passed on, your filter just sets up the
>> response (status, header, etc.) and returns.
>>
> 
Actually, let me add another question, linked to my earlier explanation :

 From a front-end Apache, I am issuing a request to Tomcat, with the 
only purpose of getting back a small string (a user-id).
I would imagine that for Tomcat generating a whole response (headers + 
body) is heavier than generating just a set of headers.
So can I, from the filter as before, generate a response consisting 
*only* of headers, among which one "propietary" one that would contain 
the string I want.

I would basically need only a response with

HTTP status line
MyHeader: johnsmith

(and no body)

At the limit, it could even be just the status line, with my return 
string in the message part.
I know that's pushing the HTTP protocol a bit, but this is a purely 
internal message, never sent back to a browser.



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


Mime
View raw message