tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: Tomcat question
Date Sun, 23 Feb 2003 21:35:19 GMT
This is really exactly the sort of usage that Filters were designed to deal
with.  You are much better off using a Filter.

Just for chuckles, the following should work for a Servlet-based solution
(for TC 4 at least):

public void service(HttpServletRequest request, HttpServletResponse
response)
   throws ServletException, IOException {
   // insert logging logic here

   RequestDispatcher rd = getServletContext().getNamedDispatcher("default");
   rd.forward(request, response);
}

"ali salehi" <nashenas82@yahoo.com> wrote in message
news:20030223201853.21002.qmail@web12001.mail.yahoo.com...
> Hi,
> I want to write a servlet to log any request to the
> .gif files in my server (im using tomcat 4.1.18).
> I have mapped any requests ending with .gif to a
> servlet (using web.xml file )
> My questions are :
> 1. Which method(s) do i need to override (doPost or
> doGet) ?
> 2. After logging the request, how can i delegate
> sending the .gif file to the server itself ?
> Thanks
> Bye
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, more
> http://taxes.yahoo.com/




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


Mime
View raw message