The url-pattern DispatcherServlet try not configured as "/ *"

The url-pattern DispatcherServlet try not configured as "/ *"

the reason

  • When configured as the Dispatcher url "/ *", the will of tomcat web.xml inside default, jspServlet overwrite the like.
  • "/ *" Configuration seems to cause the filter to filter the path request exception.
    As follows--

Configured as "/":

Configured as "/ *"

in the debug will find "/" behind the request will be two configurations of the filter difference, that the positioning of the deployment path of the project's different. This can lead to errors when the redirection address some of the problems. In the project development process must pay more attention to the path, choose the right way, with the absolute or relative path to make it clear.

Guess you like

Origin www.cnblogs.com/life-of-coding/p/11960304.html