HttpServletRequestで取得出来る情報について
HttpServletRequestで取得出来る情報例
HTTP Mehod: GET URL: http://localhost:8080/test?category=book&year=2000
- getMethod():get
- getQueryString():category=book&year=2000
- getRequestURI():/test
- getRequestURL():http://localhost/test
- getLocalAddr():127.0.0.1
- getLocalName():localhost(サーバー内部で識別される名前)
- getLocalPort():80
- getProtocol():HTTP/1.1
- getRemoteAddr():127.0.0.1
- getRemoteHost():localhost(リクエスト元のクライアントのホスト名)
- getRemotePort():80
- getSchema():http
- getServerName():localhost(リクエストした先のサーバーのホスト名)
- getServerPort():80