Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.enterprise
Class WebUtils

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

    public class WebUtils

extends 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, URL url)` reads proxyHost and proxyPort from system parameters and sets them to the passed HttpClient instance
`static 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 String` | `readCharsetFromContentType(javax.servlet.http.HttpServletRequest request)` returns the charset read from the content type of the passed `HttpServletRequest`.
`static String` | `readCharsetFromContentType(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 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,
                                                                            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 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 String readCharsetFromContentType(String contentType)

  Parameters:
    `contentType` -
  Returns:
    charset
  See Also:
    `readCharsetFromContentType(HttpServletRequest)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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