Class StrutsPrepareAndExecuteFilter
java.lang.Object
org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
- All Implemented Interfaces:
- jakarta.servlet.Filter,- StrutsStatics
public class StrutsPrepareAndExecuteFilter
extends Object
implements StrutsStatics, jakarta.servlet.Filter
Handles both the preparation and execution phases of the Struts dispatching process.  This filter is better to use
 when you don't have another filter that needs access to action context information, such as Sitemesh.
- 
Field SummaryFieldsFields inherited from interface org.apache.struts2.StrutsStaticsACTION_MAPPING, HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_ACTION_TAG_INVOCATION
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected ExecuteOperationscreateExecuteOperations(Dispatcher dispatcher) Creates a new instance ofExecuteOperationsto be used during initialisingDispatcherprotected InitOperationsCreates a new instance ofInitOperationsto be used during initialisingDispatcherprotected PrepareOperationscreatePrepareOperations(Dispatcher dispatcher) Creates a new instance ofPrepareOperationsto be used during initialisingDispatchervoiddestroy()voiddoFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) voidinit(jakarta.servlet.FilterConfig filterConfig) protected voidpostInit(Dispatcher dispatcher, jakarta.servlet.FilterConfig filterConfig) Callback for post initialization
- 
Field Details- 
prepare
- 
execute
 
- 
- 
Constructor Details- 
StrutsPrepareAndExecuteFilterpublic StrutsPrepareAndExecuteFilter()
 
- 
- 
Method Details- 
initpublic void init(jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException - Specified by:
- initin interface- jakarta.servlet.Filter
- Throws:
- jakarta.servlet.ServletException
 
- 
createInitOperationsCreates a new instance ofInitOperationsto be used during initialisingDispatcher- Returns:
- instance of InitOperations
 
- 
createPrepareOperationsCreates a new instance ofPrepareOperationsto be used during initialisingDispatcher- Returns:
- instance of PrepareOperations
 
- 
createExecuteOperationsCreates a new instance ofExecuteOperationsto be used during initialisingDispatcher- Returns:
- instance of ExecuteOperations
 
- 
postInitCallback for post initialization- Parameters:
- dispatcher- the dispatcher
- filterConfig- the filter config
 
- 
doFilterpublic void doFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException - Specified by:
- doFilterin interface- jakarta.servlet.Filter
- Throws:
- IOException
- jakarta.servlet.ServletException
 
- 
destroypublic void destroy()- Specified by:
- destroyin interface- jakarta.servlet.Filter
 
 
-