摘要: 一.spring-serlvet.xml1 2 3 4 5 二.Controller 1 @Controller 2 public class PersonController { 3 4 @RequestMapping(value="/test/add" , method=RequestMethod.GET ) 5 public ModelAndView add(){ 6 String data = "这是一个添加人的方法"; 7 return new ModelAndView("/index... 阅读全文
posted @ 2014-01-07 17:10 哎呦喂,我的小祖宗╰つ 阅读(1092) 评论(0) 推荐(0) 编辑
摘要: web.xml 1 2 spring 3 org.springframework.web.servlet.DispatcherServlet 4 5 contextConfigLocation 6 classpath:/springmvc/spring-servlet.xml 7 8 1 9 10 11 spring12 / 13 如果web.xml文件是这样配置的,mapping映射路径是所... 阅读全文
posted @ 2014-01-07 14:50 哎呦喂,我的小祖宗╰つ 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 一.Controller 1 public class MultiController extends MultiActionController { 2 3 public ModelAndView add(HttpServletRequest request,HttpServletResponse response){ 4 System.out.println("add"); 5 String data = "add"; 6 return new ModelAndView("/index","data",data 阅读全文
posted @ 2014-01-07 14:25 哎呦喂,我的小祖宗╰つ 阅读(418) 评论(0) 推荐(0) 编辑