/** * Extract the desired request property, and pass it (along with the * specified request and response objects) to the protected * <code>process()</code> method to perform the actual filtering. * This method must be implemented by a concrete subclass. * * @param request The servlet request to be processed * @param response The servlet response to be created * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ public void invoke(Request request, Response response) throws IOException, ServletException { process(request.getRequest().getRemoteAddr(), request, response); }
/** * Create a new Remote Address Filter Valve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered */ public String createRemoteAddrValve(String parent) throws Exception { // Create a new RemoteAddrValve instance RemoteAddrValve valve = new RemoteAddrValve(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); containerBase.addValve(valve); ObjectName oname = valve.getObjectName(); return (oname.toString()); }
@Override public void invoke(Request request, Response response) throws IOException, ServletException { String property; if (getAddConnectorPort()) { property = request.getRequest().getRemoteAddr() + ";" + request.getConnector().getPortWithOffset(); } else { property = request.getRequest().getRemoteAddr(); } process(property, request, response); }
remoteAddrValve = new RemoteAddrValve(); _logger.fine("Allowing access to " + getID()+ " from " + allow); remoteAddrValve.setAllow(allow); _logger.fine("Denying access to " + getID()+ " from " + deny); remoteAddrValve.setDeny(deny);
/** * Extract the desired request property, and pass it (along with the * specified request and response objects) to the protected * <code>process()</code> method to perform the actual filtering. * This method must be implemented by a concrete subclass. * * @param request The servlet request to be processed * @param response The servlet response to be created * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ public void invoke(Request request, Response response) throws IOException, ServletException { process(request.getRequest().getRemoteAddr(), request, response); }
/** * Create a new Remote Address Filter Valve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered */ public String createRemoteAddrValve(String parent) throws Exception { // Create a new RemoteAddrValve instance RemoteAddrValve valve = new RemoteAddrValve(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); containerBase.getPipeline().addValve(valve); ObjectName oname = valve.getObjectName(); return (oname.toString()); }
@Override public void invoke(Request request, Response response) throws IOException, ServletException { String property; if (getAddConnectorPort()) { property = request.getRequest().getRemoteAddr() + ";" + request.getConnector().getPort(); } else { property = request.getRequest().getRemoteAddr(); } process(property, request, response); }
/** * Extract the desired request property, and pass it (along with the * specified request and response objects) to the protected * <code>process()</code> method to perform the actual filtering. * This method must be implemented by a concrete subclass. * * @param request The servlet request to be processed * @param response The servlet response to be created * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ public void invoke(Request request, Response response) throws IOException, ServletException { process(request.getRequest().getRemoteAddr(), request, response); }
/** * Create a new Remote Address Filter Valve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered */ public String createRemoteAddrValve(String parent) throws Exception { // Create a new RemoteAddrValve instance RemoteAddrValve valve = new RemoteAddrValve(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); containerBase.getPipeline().addValve(valve); ObjectName oname = valve.getObjectName(); return (oname.toString()); }
/** * Extract the desired request property, and pass it (along with the * specified request and response objects) to the protected * <code>process()</code> method to perform the actual filtering. * This method must be implemented by a concrete subclass. * * @param request The servlet request to be processed * @param response The servlet response to be created * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ @Override public void invoke(Request request, Response response) throws IOException, ServletException { process(request.getRequest().getRemoteAddr(), request, response); }
/** * Create a new Remote Address Filter Valve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered */ public String createRemoteAddrValve(String parent) throws Exception { // Create a new RemoteAddrValve instance RemoteAddrValve valve = new RemoteAddrValve(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); containerBase.getPipeline().addValve(valve); ObjectName oname = valve.getObjectName(); return (oname.toString()); }
/** * Extract the desired request property, and pass it (along with the * specified request and response objects) to the protected * <code>process()</code> method to perform the actual filtering. * This method must be implemented by a concrete subclass. * * @param request The servlet request to be processed * @param response The servlet response to be created * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ @Override public void invoke(Request request, Response response) throws IOException, ServletException { process(request.getRequest().getRemoteAddr(), request, response); }
/** * Create a new Remote Address Filter Valve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered * * @deprecated Will be removed in Tomcat 8.0.x. Replaced by {@link * #createValve(String, String)}. */ @Deprecated public String createRemoteAddrValve(String parent) throws Exception { // Create a new RemoteAddrValve instance RemoteAddrValve valve = new RemoteAddrValve(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); containerBase.getPipeline().addValve(valve); ObjectName oname = valve.getObjectName(); return (oname.toString()); }
/** * Extract the desired request property, and pass it (along with the * specified request and response objects) to the protected * <code>process()</code> method to perform the actual filtering. * This method must be implemented by a concrete subclass. * * @param request The servlet request to be processed * @param response The servlet response to be created * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ @Override public void invoke(Request request, Response response) throws IOException, ServletException { process(request.getRequest().getRemoteAddr(), request, response); } }
/** * Create a new Remote Address Filter Valve. * * @param parent MBean Name of the associated parent component * * @exception Exception if an MBean cannot be created or registered * * @deprecated Will be removed in Tomcat 8.0.x. Replaced by {@link * #createValve(String, String)}. */ @Deprecated public String createRemoteAddrValve(String parent) throws Exception { // Create a new RemoteAddrValve instance RemoteAddrValve valve = new RemoteAddrValve(); // Add the new instance to its parent component ObjectName pname = new ObjectName(parent); ContainerBase containerBase = getParentContainerFromParent(pname); containerBase.getPipeline().addValve(valve); ObjectName oname = valve.getObjectName(); return (oname.toString()); }
/** * Extract the desired request property, and pass it (along with the * specified request and response objects) to the protected * <code>process()</code> method to perform the actual filtering. * This method must be implemented by a concrete subclass. * * @param request The servlet request to be processed * @param response The servlet response to be created * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ @Override public void invoke(Request request, Response response) throws IOException, ServletException { process(request.getRequest().getRemoteAddr(), request, response); }
/** * Extract the desired request property, and pass it (along with the * specified request and response objects) to the protected * <code>process()</code> method to perform the actual filtering. * This method must be implemented by a concrete subclass. * * @param request The servlet request to be processed * @param response The servlet response to be created * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ @Override public void invoke(Request request, Response response) throws IOException, ServletException { process(request.getRequest().getRemoteAddr(), request, response); }
/** * Extract the desired request property, and pass it (along with the * specified request and response objects) to the protected * <code>process()</code> method to perform the actual filtering. * This method must be implemented by a concrete subclass. * * @param request The servlet request to be processed * @param response The servlet response to be created * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ @Override public void invoke(Request request, Response response) throws IOException, ServletException { process(request.getRequest().getRemoteAddr(), request, response); }
/** * Extract the desired request property, and pass it (along with the * specified request and response objects) to the protected * <code>process()</code> method to perform the actual filtering. * This method must be implemented by a concrete subclass. * * @param request The servlet request to be processed * @param response The servlet response to be created * * @exception IOException if an input/output error occurs * @exception ServletException if a servlet error occurs */ public int invoke(Request request, Response response) throws IOException, ServletException { return process(request.getRequest().getRemoteAddr(), request, response); }