SpringMVC入门
原文在这 http://www.cnblogs.com/bigdataZJ/p/springmvc1.html ,顺序是
1. web.xml是配置dispatchservlet
2.index.jsp
<a href="helloworld">hello world</a>
通过点击hello world的超链接,
由“http://localhost:8080/springTest/index.jsp”跳转
到“http://localhost:8080/springTest/helloworld”
3.HelloWorld.java是配置controller
@RequestMapping("/helloworld")
return "success";
4.Springmvc.xml是配置viewresolver
<property name = "prefix" value="/WEB-INF/views/"></property>
<property name = "suffix" value = ".jsp"></property>
请求/WEB-INF/views/success.jsp
5.success.jsp
请求成功

浙公网安备 33010602011771号