1 7 8 package org.jboss.web.tomcat.security; 9 10 import java.io.IOException ; 11 12 import javax.servlet.ServletException ; 13 14 import org.apache.catalina.connector.Request; 15 import org.apache.catalina.connector.Response; 16 import org.apache.catalina.valves.ValveBase; 17 18 26 public class HttpServletRequestValve extends ValveBase 27 { 28 29 public static ThreadLocal httpRequest = new ThreadLocal (); 30 31 34 public HttpServletRequestValve() 35 { 36 } 37 38 42 public void invoke(Request request, Response response) throws IOException , 43 ServletException 44 { 45 try 46 { 47 httpRequest.set(request.getRequest()); 49 50 getNext().invoke(request, response); 52 } 53 finally 54 { 55 httpRequest.set(null); 57 } 58 } 59 } | Popular Tags |