Class StrutsPrepareFilter
java.lang.Object
org.apache.struts2.dispatcher.filter.StrutsPrepareFilter
- All Implemented Interfaces:
jakarta.servlet.Filter,StrutsStatics
Prepares the request for execution by a later
StrutsExecuteFilter filter instance.-
Field Summary
FieldsFields inherited from interface org.apache.struts2.StrutsStatics
ACTION_MAPPING, HTTP_REQUEST, HTTP_RESPONSE, PAGE_CONTEXT, SERVLET_CONTEXT, SERVLET_DISPATCHER, STRUTS_ACTION_TAG_INVOCATION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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
-
REQUEST_EXCLUDED_FROM_ACTION_MAPPING
-
prepare
-
-
Constructor Details
-
StrutsPrepareFilter
public StrutsPrepareFilter()
-
-
Method Details
-
init
public void init(jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException - Specified by:
initin interfacejakarta.servlet.Filter- Throws:
jakarta.servlet.ServletException
-
createInitOperations
Creates a new instance ofInitOperationsto be used during initialisingDispatcher- Returns:
- instance of
InitOperations
-
createPrepareOperations
Creates a new instance ofPrepareOperationsto be used during initialisingDispatcher- Returns:
- instance of
PrepareOperations
-
postInit
Callback for post initialization- Parameters:
dispatcher- the dispatcherfilterConfig- the filter config
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest req, jakarta.servlet.ServletResponse res, jakarta.servlet.FilterChain chain) throws IOException, jakarta.servlet.ServletException - Specified by:
doFilterin interfacejakarta.servlet.Filter- Throws:
IOExceptionjakarta.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroyin interfacejakarta.servlet.Filter
-