1
|
|
/* Generated by AspectJ version 1.0.5 */
|
2
|
|
package org.apache.cactus.util;
|
3
|
|
/**
|
4
|
|
* Provides access to the Cactus configuration parameters related to the
|
5
|
|
* Servlet Redirector.
|
6
|
|
*
|
7
|
|
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
|
8
|
|
*
|
9
|
|
* @version $Id: ServletConfiguration.java,v 1.3 2002/05/20 21:49:25 vmassol Exp $
|
10
|
|
*
|
11
|
|
* @see Configuration
|
12
|
|
*/
|
13
|
|
public class ServletConfiguration extends Configuration {
|
14
|
|
/**
|
15
|
|
* Name of the cactus property that specifies the name of the Servlet
|
16
|
|
* redirector.
|
17
|
|
*/
|
18
|
|
public static final String CACTUS_SERVLET_REDIRECTOR_NAME_PROPERTY =
|
19
|
|
"cactus.servletRedirectorName";
|
20
|
|
/**
|
21
|
|
* Read the Servlet redirector name from a System property first and then
|
22
|
|
* if it fails from the Cactus configuration file and then use the default
|
23
|
|
* "ServletRedirector" name if it fails.
|
24
|
|
*
|
25
|
|
* @return the Servlet redirector URL
|
26
|
|
*/
|
27
|
0
|
public static String getServletRedirectorURL() {
|
28
|
0
|
ServletConfiguration.initialize();
|
29
|
0
|
String servletRedirectorName = System.getProperty("cactus.servletRedirectorName");
|
30
|
0
|
if (servletRedirectorName == null) {
|
31
|
0
|
servletRedirectorName = "ServletRedirector";
|
32
|
|
}
|
33
|
0
|
return ServletConfiguration.getContextURL() + "/" + servletRedirectorName;
|
34
|
|
}
|
35
|
|
|
36
|
|
/**
|
37
|
|
* Provides access to the Cactus configuration parameters related to the
|
38
|
|
* Servlet Redirector.
|
39
|
|
*
|
40
|
|
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
|
41
|
|
*
|
42
|
|
* @version $Id: ServletConfiguration.java,v 1.3 2002/05/20 21:49:25 vmassol Exp $
|
43
|
|
*
|
44
|
|
* @see Configuration
|
45
|
|
*/
|
46
|
0
|
public ServletConfiguration() {
|
47
|
0
|
super();
|
48
|
|
}
|
49
|
|
}
|