tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergio <>
Subject Valve to intercept outgoing requests
Date Wed, 06 Apr 2011 12:19:44 GMT
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 {
     public void invoke(Request request, Response response) throws 
IOException, ServletException {

         if (request.getRequestURI().contains("/WebPages")) {
             System.out.println("TestValve: context /WebPages");
             String teste = (String) 
             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?


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

View raw message