>
> 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
HTML.
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?
Chris
public void doFilter(ServletRequest req, ServletResponse resp,
FilterChain chain)
throws IOException, ServletException
{
HttpServletRequest request = (HttpServletRequest) req;
HttpServletResponse response = (HttpServletResponse) resp;
try
{
System.out.println( "REQ : getRequestURI : " + request.getRequestURI()
);
String filteredURL = "/hal"+request.getRequestURI();
System.out.println( filteredURL );
//chain.doFilter(request, response);
response.sendRedirect(response.encodeRedirectURL(filteredURL));
}
catch (IOException io)
{
System.out.println ("IOException raised in Filter");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]