标签:query 对象 gets tco login 服务器 user 问号 pat
Request对象通过以下方法来获取请求路径。
(1)String getServerName():获取服务器名:localhost
(2)String getServerPort():获取服务器端口号:8080
(3)String getContextPath():获取项目名:Test
(4)String getServletPath():获取Servlet路径:/login
(5)String getQueryString():获取参数部门,即问号后面的部分:username=zhangsan
(6)String getRequestURL():获取请求URL
标签:query 对象 gets tco login 服务器 user 问号 pat
原文地址:http://www.cnblogs.com/www-hsy-com/p/7565222.html