Class ServletUtils


  • public final class ServletUtils
    extends java.lang.Object
    The servlet utiltity
    Version:
    $Id: ServletUtils.java,v 1.3 2004/10/23 15:27:01 thlee Exp $ $Name: $
    Author:
    TiongHiang Lee (thlee@onemindsoft.org)
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ServletUtils()
      Constructor
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map getExtraRequestEnvironment​(javax.servlet.http.HttpServletRequest req)
      Get request attributes (Only for jsdk 2.3)
      static java.util.Map getRequestEnvironment​(javax.servlet.http.HttpServletRequest req)
      Get the request environment
      static java.util.Map getRequestParameters​(javax.servlet.http.HttpServletRequest req, org.apache.commons.fileupload.DiskFileUpload upload)
      Get the request parameters in a mp
      static java.util.Map getServletEnvironment​(javax.servlet.ServletConfig config)
      Get the servlet environment from the config
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ServletUtils

        private ServletUtils()
        Constructor
    • Method Detail

      • getRequestEnvironment

        public static java.util.Map getRequestEnvironment​(javax.servlet.http.HttpServletRequest req)
        Get the request environment
        Parameters:
        req - the request
        Returns:
        the environment in a map
      • getExtraRequestEnvironment

        public static java.util.Map getExtraRequestEnvironment​(javax.servlet.http.HttpServletRequest req)
        Get request attributes (Only for jsdk 2.3)
        Parameters:
        req - the request
        Returns:
        the servlet attributes
      • getServletEnvironment

        public static java.util.Map getServletEnvironment​(javax.servlet.ServletConfig config)
        Get the servlet environment from the config
        Parameters:
        config - the config
        Returns:
        the environment in a map
      • getRequestParameters

        public static java.util.Map getRequestParameters​(javax.servlet.http.HttpServletRequest req,
                                                         org.apache.commons.fileupload.DiskFileUpload upload)
                                                  throws org.apache.commons.fileupload.FileUploadException
        Get the request parameters in a mp
        Parameters:
        req - the request
        Returns:
        the environment in the map
        Throws:
        org.apache.commons.fileupload.FileUploadException