1.jsp
2.jsp
3.jsp
LianxiAction:
package com.etc.controller; import javax.servlet.http.HttpSession; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; @Controller public class LianxiAction { @RequestMapping("2") public String do2(@RequestParam(value="a",required=true)String a ,HttpSession session) { session.setAttribute("a", a); return "2"; } @RequestMapping("3") public String do3(@RequestParam(value="b",required=true)String b ,HttpSession session) { session.setAttribute("b", b); return "3"; } }