2015-02-21 10:55

[Java] ServletRequest 筆記

Request URL
http://30thh.loc:8480/app/test%3F/a%3F+b;jsessionid=S%3F+ID?p+1=c+d&p+2=e+f#a

MethodURL DecodedResult
getContextPath()/app
getLocalAddr()127.0.0.1
getLocalName()30thh.loc
getLocalPort()8480
getMethod()GET
getPathInfo()yes/a?+b
getProtocol()HTTP/1.1
getQueryString()nop+1=c+d&p+2=e+f
getRequestedSessionId()noS%3F+ID
getRequestURI()no/app/test%3F/a%3F+b;jsessionid=S+ID
getRequestURL()nohttp://30thh.loc:8480/app/test%3F/a%3F+b;jsessionid=S+ID
getScheme()http
getServerName()30thh.loc
getServerPort()8480
getServletPath()yes/test?
getParameterNames()yes[p 2, p 1]
getParameter("p 1")yesc d

0 回應: