I also encountered the above problems, so I recorded them.
always phenomenon is:
spring uses forward ("/WEB-INF/JSP /*. JSP ")
while forward certainly goes through the Web. XML ing,
then, when the URL matches,
URL-pattern
/
URL-pattern
>
does not match *. JSP does not enter Dispatcherservlet class
URL-pattern
/*
URL-pattern
Yes
match *. JSP. As a result, enter spring's dispatcherservlet
class, find the controller, and connect The corresponding controller cannot be found, so an error is reported.
I tried it and changed it <
URL-Pattern
>
/
</
URL-Pattern
>
Sure enough, no error will be reported. Alas, I thought it could not be solved. For this reason, I changed it to velocity as the view. If you forget it, continue to use velocity, which is simple.
In short, there is little knowledge about URL ing in Web. xml:
<URL-pattern>/</url-pattern> matches the path-type URL such as/login, and does not match the suffix-type URL such as *. jsp.
<URL-pattern>/* </url-pattern> matches all urls: URL with path type and suffix type (including/login ,*. JSP ,*. JS and *. HTML, etc)