org.apache.cactus.client
Class HttpClientHelper
java.lang.Object
|
+--org.apache.cactus.client.HttpClientHelper
- public class HttpClientHelper
- extends java.lang.Object
Helper class to open an HTTP connection to the server redirector and pass
to it HTTP parameters, Cookies and HTTP headers.
- Version:
- $Id: HttpClientHelper.java,v 1.10 2001/09/14 20:15:26 pier Exp $
- Author:
- Vincent Massol
Method Summary |
java.net.HttpURLConnection |
connect(WebRequest theRequest)
Calls the Servlet Redirector. |
static java.lang.String |
getDomain(WebRequest theRequest,
java.net.URLConnection theConnection)
Returns the domain that will be used to send the cookies. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpClientHelper
public HttpClientHelper(java.lang.String theURL)
- Parameters:
theURL
- the URL that will be used for the HTTP connection.
getDomain
public static java.lang.String getDomain(WebRequest theRequest,
java.net.URLConnection theConnection)
- Returns the domain that will be used to send the cookies. If a host
was specified using
setURL()
then the domain will be
this host. Otherwise it will be the redirector host.
- Parameters:
theRequest
- the request containing all data to pass to the server
redirector.theConnection
- the HTTP connection- Returns:
- the cookie domain to use
connect
public java.net.HttpURLConnection connect(WebRequest theRequest)
throws java.lang.Throwable
- Calls the Servlet Redirector.
- Parameters:
theRequest
- the request containing all data to pass to the
server redirector.- Throws:
java.lang.Throwable
- if an unexpected error occured
Copyright © 2000-2001 Apache Software Foundation. All Rights Reserved.