Get HttpServletRequest : Request « JSP « Java Tutorial

  Copyright (c) 2002 by Phil Hanna
  All rights reserved.
  You may study, use, modify, and distribute this
  software for any purpose provided that this
  copyright notice appears in all copies.
  This software is provided without warranty
  either expressed or implied.
<%@ page import="java.util.*" %>
   String title = "HttpServletRequest Method Values";
   Map entries = new TreeMap();
   entries.put("getCharacterEncoding", request.getCharacterEncoding());
   entries.put("getContentLength", "" + request.getContentLength());
   entries.put("getContentType", request.getContentType());
   entries.put("getLocale", request.getLocale());
   entries.put("getProtocol", request.getProtocol());
   entries.put("getRemoteAddr", request.getRemoteAddr());
   entries.put("getRemoteHost", request.getRemoteHost());
   entries.put("getScheme", request.getScheme());
   entries.put("getServerName", request.getServerName());
   entries.put("getServerPort", "" + request.getServerPort());
   entries.put("isSecure", "" + request.isSecure());
   request.setAttribute("_table_title", title);
   request.setAttribute("_table_entries", entries);
  Download: 3 k)

23.34.1.Get HttpServletRequest
23.34.2.Reference Http Servlet Request in Bean
23.34.3.Put Request Header Name and Value to TreeMap
23.34.4.Get Parameter Name and Value from TreeMap
23.34.5.Get Servlet Request
23.34.6.Decoding an HTTP Request
23.34.7.Retrieving the Original URI