deegree 2.5 (2011/06/29 09:44 build-8-official)

org.deegree.enterprise
Class WebUtils

java.lang.Object
  extended by org.deegree.enterprise.WebUtils

public class WebUtils
extends java.lang.Object

Since:
2.0
Version:
$Revision: 22300 $, 1.0. $Revision: 22300 $, $Date: 2010-01-28 17:49:48 +0100 (Do, 28 Jan 2010) $
Author:
Andreas Poth, last edited by: $Author: aschmitz $

Constructor Summary
WebUtils()
           
 
Method Summary
static org.apache.commons.httpclient.HttpClient enableProxyUsage(org.apache.commons.httpclient.HttpClient client, java.net.URL url)
          reads proxyHost and proxyPort from system parameters and sets them to the passed HttpClient instance
static java.lang.String getAbsoluteContextPath(javax.servlet.http.HttpServletRequest request)
          returns the root path (address - port - context) of a web application read from the passed request
e.g. http://myserver:8080/deegree/services?
static java.lang.String readCharsetFromContentType(javax.servlet.http.HttpServletRequest request)
          returns the charset read from the content type of the passed HttpServletRequest.
static java.lang.String readCharsetFromContentType(java.lang.String contentType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebUtils

public WebUtils()
Method Detail

getAbsoluteContextPath

public static java.lang.String getAbsoluteContextPath(javax.servlet.http.HttpServletRequest request)
returns the root path (address - port - context) of a web application read from the passed request
e.g. http://myserver:8080/deegree/services?request=GetCapabilites ...
will return 'http://myserver:8080/deegree'

Parameters:
request -
Returns:
the root path (address - port - context) of a web application read from the passed request

enableProxyUsage

public static org.apache.commons.httpclient.HttpClient enableProxyUsage(org.apache.commons.httpclient.HttpClient client,
                                                                        java.net.URL url)
reads proxyHost and proxyPort from system parameters and sets them to the passed HttpClient instance

Parameters:
client -
url -
Returns:
HttpClient with proxy configuration
See Also:
of the passed, HttpClient

readCharsetFromContentType

public static java.lang.String readCharsetFromContentType(javax.servlet.http.HttpServletRequest request)
returns the charset read from the content type of the passed HttpServletRequest. If no content type or no charset is defined the charset read from CharsetUtils will be returned instead. So it is gauranteed that the method will not return null

Parameters:
request -
Returns:
charset

readCharsetFromContentType

public static java.lang.String readCharsetFromContentType(java.lang.String contentType)
Parameters:
contentType -
Returns:
charset
See Also:
readCharsetFromContentType(HttpServletRequest)

deegree 2.5 (2011/06/29 09:44 build-8-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org