org.apache.cactus.server
class ServletUtil

java.lang.Object
  |
  +--org.apache.cactus.server.ServletUtil
Known Advisors:
LogAspect

public class ServletUtil
extends java.lang.Object

All prupose utility methods for manipulating the Servlet API.

Version:
$Id: ServletUtil.java,v 1.1 2002/03/01 00:43:46 vmassol Exp $
Author:
Vincent Massol

Constructor Summary
ServletUtil()
          All prupose utility methods for manipulating the Servlet API.
 
Method Summary
static String getQueryStringParameter(String theQueryString, String theParameter)
          A substitute method for HttpServletRequest.getParameter().
          Affected by: LogAspect
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServletUtil

public ServletUtil()
All prupose utility methods for manipulating the Servlet API.
Method Detail

getQueryStringParameter

public static String getQueryStringParameter(String theQueryString,
                                             String theParameter)
A substitute method for HttpServletRequest.getParameter(). Contrary to getParameter(), this method does not access the request input stream (only the query string of the url). Note: We use this method internally to retrieve Cactus parameters passed by the client side. The issue with getParameter() is that if you use it, then you cannot call getReader() or getInputStream() (see the Servlet spec). However, if we want to allow for testing code that uses these 2 methods (and we do !) we need to use this method to get the internal Cactus parameters.
Parameters:
theQueryString - the query string to parse
theParameter - the name of the parameter to locate
Returns:
the value for theParameter in theQueryString, null if theParameter does not exist and "" if the parameter exists but has no value defined in the query string
Affected by:
around() in LogAspect.


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.