springmvc可以接受传入的API:
- HttpServletRequest
- HttpServletResponse
- HttpSession
- java.security.Principal
- InputStream
- OutputStream
- Reader
- Writer
@RequestMapping("/springmvc") @Controller public class SpringmvcTest { private static final String SUCCESS = "success"; @RequestMapping(value="/testServletAPI") public String testServletAPI(HttpServletRequest request,HttpServletResponse response) { System.out.println("HttpServletRequest"+request+","+"HttpServletResponse"+response); return SUCCESS; } }
<a href="springmvc/testServletAPI">test ServletAPI</a>