1
|
|
/* Generated by AspectJ version 1.0.5 */
|
2
|
|
package org.apache.cactus.client;
|
3
|
|
import org.apache.cactus.WebRequest;
|
4
|
|
import org.apache.cactus.util.ServletConfiguration;
|
5
|
|
|
6
|
|
/**
|
7
|
|
* Manage the logic for calling the Servlet redirector for executing a test on
|
8
|
|
* the server side.
|
9
|
|
*
|
10
|
|
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
|
11
|
|
*
|
12
|
|
* @version $Id: ServletHttpClient.java,v 1.4 2002/07/21 12:09:16 vmassol Exp $
|
13
|
|
*/
|
14
|
|
public class ServletHttpClient extends AbstractHttpClient {
|
15
|
|
/**
|
16
|
|
* Return the redirector URL to connect to.
|
17
|
|
*
|
18
|
|
* @param theRequest Request data from the user. We need it here as the user
|
19
|
|
* may have chosen to override the default redirector.
|
20
|
|
* @return the URL to call the redirector
|
21
|
|
*/
|
22
|
0
|
protected String getRedirectorURL(WebRequest theRequest) {
|
23
|
0
|
String url;
|
24
|
0
|
if (theRequest.getRedirectorName() != null) {
|
25
|
0
|
url = ServletConfiguration.getContextURL() + "/" + theRequest.getRedirectorName();
|
26
|
|
} else {
|
27
|
0
|
url = ServletConfiguration.getServletRedirectorURL();
|
28
|
|
}
|
29
|
0
|
return url;
|
30
|
|
}
|
31
|
|
|
32
|
|
/**
|
33
|
|
* Manage the logic for calling the Servlet redirector for executing a test on
|
34
|
|
* the server side.
|
35
|
|
*
|
36
|
|
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
|
37
|
|
*
|
38
|
|
* @version $Id: ServletHttpClient.java,v 1.4 2002/07/21 12:09:16 vmassol Exp $
|
39
|
|
*/
|
40
|
0
|
public ServletHttpClient() {
|
41
|
0
|
super();
|
42
|
|
}
|
43
|
|
}
|