org.apache.lenya.util
Class ServletHelper

java.lang.Object
  extended by org.apache.lenya.util.ServletHelper

public final class ServletHelper
extends java.lang.Object

Servlet utility class.


Method Summary
static java.util.Map getParameterMap(org.apache.cocoon.environment.Request request)
          Converts the request parameters to a map.
static java.lang.String getWebappURI(org.apache.cocoon.environment.Request request)
          Returns the URL inside the web application (without the context prefix).
static java.lang.String getWebappURI(java.lang.String context, java.lang.String requestUri)
          Returns the URL inside the web application (without the context prefix).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getWebappURI

public static java.lang.String getWebappURI(org.apache.cocoon.environment.Request request)
Returns the URL inside the web application (without the context prefix).

Parameters:
request - The request.
Returns:
A string.

getWebappURI

public static java.lang.String getWebappURI(java.lang.String context,
                                            java.lang.String requestUri)
Returns the URL inside the web application (without the context prefix).

Parameters:
context - The context prefix.
requestUri - The complete request URI.
Returns:
A string.

getParameterMap

public static java.util.Map getParameterMap(org.apache.cocoon.environment.Request request)
Converts the request parameters to a map. If a key is mapped to multiple parameters, a string array is used as the value.

Parameters:
request - The request.
Returns:
A map.


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.