public static interface ServletModule.RequestListener
|Modifier and Type||Method and Description|
Handles the request, if this is the type of request the listener is interested in.
boolean handleRequest(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, ModulesServlet.HttpMethod method, User user) throws javax.servlet.ServletException, java.io.IOException, ActionException
Handles the request, if this is the type of request the listener is interested in. If the listener does not wish to handle the request, it should return false. False return value indicates that the request should be passed to other listeners, a true return value indicates that this should not happen and a response to the request has been sent. Thus it is possible that you perform some action and still return false and let some other action write the response.
However, keep in mind that some other listener may grab any request before your listener and your listener will then never even see the request. Thus, you will not necessarily be notified of every single request. If this is your goal, you should probably make a separate context that all requests will pass through before they are passed on to other actions, see GenericContext.
req- The HTTP request.
resp- The HTTP response.
method- The HTTP method of the request.
user- The logged in user if applicable or null.
Copyright 2004-2015 Wandora Team