标签:链接 sts row api uri connect let nbsp out
SpringMVC的handler接收如下的ServletAPI类型的参数:
? HttpServletRequest
? HttpServletResponse
? HttpSession
? java.security.Principal
? Locale
? InputStream
? OutputStream
? Reader
? Writer
示例:
@RequestMapping("/testServletAPI") public void testServletAPI(HttpServletRequest request, HttpServletResponse response, Writer out) throws IOException { System.out.println("testServletAPI: " + request + "," + response); out.write("hello springmvc"); } 对应的jsp: <a href="test/testServletAPI">Test ServletAPI</a>
运行项目,点击超链接:
控制台输出:
testServletAPI: org.apache.catalina.connector.RequestFacade@21f0bb9b,org.apache.catalina.connector.ResponseFacade@7d1613c6
标签:链接 sts row api uri connect let nbsp out
原文地址:https://www.cnblogs.com/stm32stm32/p/9093110.html