Get Servlet Request : 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 = "ServletRequest Method Values";
   Map entries = new TreeMap();
   entries.put("getAuthType", request.getAuthType());
   entries.put("getContextPath", request.getContextPath());
   entries.put("getMethod", request.getMethod());
   entries.put("getPathInfo", request.getPathInfo());
   entries.put("getPathTranslated", request.getPathTranslated());
   entries.put("getQueryString", request.getQueryString());
   entries.put("getRemoteUser", request.getRemoteUser());
   entries.put("getRequestURI", request.getRequestURI());
   entries.put("getRequestedSessionId", request.getRequestedSessionId());
   entries.put("getServletPath", request.getServletPath());
   entries.put("isRequestedSessionIdFromCookie", "" + request.isRequestedSessionIdFromCookie());
   entries.put("isRequestedSessionIdFromURL", "" + request.isRequestedSessionIdFromURL());
   entries.put("isRequestedSessionIdValid", "" + request.isRequestedSessionIdValid());
   request.setAttribute("_table_title", title);
   request.setAttribute("_table_entries", entries);
%>
  Download:  JSPGetServletRequest.zip( 3 k)








23.34.Request
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