I made this Valve, trying to intercept requests going out of my "WebPages" context to the "Webservices" context. Right now they are both running in the same Tomcat (5.5.33), but that may not be true in the future.

public class TestValve extends org.apache.catalina.valves.ValveBase {
    @Override
public void invoke(Request request, Response response) throws IOException, ServletException {
        System.out.println("TestValve");

        if (request.getRequestURI().contains("/WebPages")) {
            System.out.println("TestValve: context /WebPages");
String teste = (String) request.getSession().getAttribute("test");
            request.setAttribute("test", teste);
        }

        getNext().invoke(request, response);
    }
}

The idea is to intercept the request to implicitly set attributes to be recovered at the "Webservices" context. This is not working. Any ideas why?

Sergio

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

Reply via email to