tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Ward" <>
Subject RE: Repeated "load-on-startup" niggle
Date Fri, 23 Jan 2004 17:11:02 GMT
> I would use sendRedirect in this case for two reasons:
> - To really make it look/act as if the request was for the /hal URL,
> - To avoid getting a RequestDispatcher for a resource outside 
> your docBase
> sendRedirect would preserve all the request parameters, 
> including POST data.

Hi Yoav,

Below is the filter I've been using.  It seems to mostly work,
but any image files from a path such as "/images/Delete.gif"
seem to not get updated to "/hal/images/Delete.gif" in the

However, the output I get to System.out *does* show the filter
processing these requests.  Any ideas?  Is this the correct way
to implement the filter?


    public void doFilter(ServletRequest req, ServletResponse resp,
FilterChain chain)
        throws IOException, ServletException 
        HttpServletRequest request = (HttpServletRequest) req;
        HttpServletResponse response = (HttpServletResponse) resp;
System.out.println( "REQ : getRequestURI   : " + request.getRequestURI()
            String filteredURL = "/hal"+request.getRequestURI();
System.out.println( filteredURL );
            //chain.doFilter(request, response);      

        catch (IOException io) 
            System.out.println ("IOException raised in Filter");

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message