Actions cannot be redirected, and forms cannot be redirected.
The reason why the action cannot jump or the form cannot jump:Note: you can find the following three reasons to ensure that other actions and forms of your project can jump normally.
1. check whether there is any write error in the action. struts does not include the class of the specified action, for example, if the path specified by the class is not in the background java, you cannot jump to
2. Whether the form has a suffix. If the suffix is action, you must configure *. Action Or /*
3. Can the action in form match the name of the action in struts. xml, for example, jsp form?
If no User is found in struts. xml (* User, * is a wildcard) or
Actions in jsp form cannot be redirected. If the action in the form does not contain a suffix, use *. Action This configuration cannot be redirected because it cannot match the suffix,
Use *. Action Tern> hourExample: 1,
Action has a suffix, which can jump normally 2,Action cannot jump because it has no suffix
However, if you use /* In the form, even if the action has no suffix, That is, Can also jump
If the form jumps normally, the console will display this method.For example, 12:11:52, 404 DEBUG (org. apache. struts2.interceptor. fileUploadInterceptor: 68)-Bypassing // saveChild2014-05-06 12:11:52, 407 DEBUG (org. apache. struts2.interceptor. validation. annotationValidationInterceptor: 68)-Validating // saveChild with method save.
Based on my own experience, if the Console does not print "Bypassing // action name", the form actions cannot jump to the background normally.
/*
Use /* This will intercept the servlet. If a servlet is created separately in the project, the servlet cannot be accessed. For example, you can use the servlet to create a verification code link.
So if you want to use the Verification Code servlet, you will use the following Configuration:
Struts *. Action *. Jsp
Jsp access failureIf only *. Action Without Definition *. Jsp Jsp cannot be accessed.
A tested web. xml file. The web. xml file header is not provided. Because the url is included, the blog cannot send URLs.
Unionweb Org. springframework. web. context. ContextLoaderListener ContextConfigLocation Classpath: applicationContext. xml Struts Org. apache. struts2.dispatcher. ng. filter. StrutsPrepareAndExecuteFilter Struts *. Action *. Jsp Login. jsp
Note: All of the above are tested by myself. If not, I hope you will point out