1):后面跟值 传参:访问的路径http://localhost:8080/@mvc/test/start.do?name='zhangsan' @RequsetMapping("/start") //url对应的映射路径 public String start(HttpServletRequest request){ request.getParamter("name");//是getParamter获取url中的参数,不是getAttribute
2):后面不跟值(方法为参数访问) 传参:访问的路径http://localhost:8080/@mvc/test.do?start @ RequsetMapping(params=”start”)
- POST http://localhost:8080/dome/portalController.do?show&sort=seq&order=asc 也可以&加参数
- @Controller @RequestMapping(value = "background/fileOperate") @RequestMapping(value = "to_upload") http://localhost:8080/springFile/background/fileOperate/upload.html html是配置的后缀web.xml