public class ActionFilter extends Object implements javax.servlet.Filter
PreviewAction
, which was on obvious case of bad code design.
The filter dispatches requests based on the presence of a request parameter starting with action_ followed by the name of the struts action that should actually process the request. For example, the button that does Save and Continue looks like:
<input type="submit" name="action_saveandcontinue" value="..."/>As a result, when clicking the button, the request is not sent to the form's target (preview), but is actually forwarded internally to /bin/saveandcontinue/The/Document.
Constructor and Description |
---|
ActionFilter() |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
doFilter(javax.servlet.ServletRequest request,
javax.servlet.ServletResponse response,
javax.servlet.FilterChain chain) |
void |
init(javax.servlet.FilterConfig filterConfig) |
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
javax.servlet.ServletException
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
IOException
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Filter
Copyright © 2004–2021 XWiki. All rights reserved.