Error scenarios:
Condition 1: The struts2 core filter filters url-pattern to *. action.
Condition 2: The struts tag is used in the JSP page.
Condition 3: Access the JSP page directly through a url
Error message:
The Struts dispatcher cannot be found. this is usually caused by using Struts tags without the associated filter. struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. -[unknown location]
Solution:
The error message is clear:This error is usually caused by the fact that the struts tag is not associated with the core filter. The Struts TAG takes effect only when the request passes the core filter, because the Struts tag requires the core filter to initialize it..
1. Change the ing of core filters in web. xml /*
Struts2 org. apache. struts2.dispatcher. ng. filter. StrutsPrepareAndExecuteFilter struts2
2. or append the *. jsp filter to the core filter.
Struts2 *. action struts2