SpringMvc出现Jsp页面不能正常解析成html网页

时间:2022-04-28 01:19:11
     <!-- Spring mvc配置 -->
<servlet>
<servlet-name>springMvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:SpringMvc.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>springMvc</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>

如果你在<url-pattern>/</url-pattern>编程<url-pattern>/*</url-pattern>Springmvc将会对jsp进行拦截导致其不能正常显示