Fields Summary |
---|
private com.sun.enterprise.config.serverbeans.WebModule | _wmBeanThe config bean containing the properties specified in the web-module
element in server.xml. |
private String | _baseDirThe parent directory under which the work directory for files generated
by the web application (i.e compiled JSP class files etc) resides. |
private ClassLoader | _parentLoaderThe parent classloader for the web application. |
private com.sun.enterprise.deployment.WebBundleDescriptor | _wbdDeployment descriptor information about the web application. |
private String | _vsIDskeep a list of virtual servers that this webmodule is associated with |
private String | stubBaseDir |
private static org.apache.catalina.util.StringManager | _smThe string manager for this package. |
Methods Summary |
---|
private java.lang.String | getAppName()Return the name of the application that this web module belongs
to or null if this is a standalone web module.
String name = null;
if (_wbd != null) {
Application app = _wbd.getApplication();
if ((app != null) && !app.isVirtual()) {
String appName = app.getRegistrationName();
if ((appName != null) && (appName.length() > 0)) {
name = appName.trim();
}
}
}
return name;
|
public com.sun.enterprise.config.serverbeans.WebModule | getBean()Return the configuration information specified in server.xml.
return _wmBean;
|
public java.lang.String | getContextPath()Return the context path at which the web application is deployed.
String ctxPath = null;
if (_wmBean != null) {
ctxPath = _wmBean.getContextRoot().trim();
// Don't prefix a / if this web module is the default one
// i.e. has an empty context-root
if ((ctxPath.length() > 0) && !ctxPath.startsWith("/")) {
ctxPath = "/" + ctxPath;
} else if (ctxPath.equals("/")) {
ctxPath = "";
}
}
return ctxPath;
|
public com.sun.enterprise.deployment.WebBundleDescriptor | getDescriptor()Return the object representation of the deployment descriptor specified
for the web application.
return _wbd;
|
public java.lang.String | getLocation()Return the directory in which the web application is deployed.
String dir = null;
if (_wmBean != null) {
dir = _wmBean.getLocation();
}
return dir;
|
private java.lang.String | getModuleName()Return just the name of the web module.
String name = null;
if (_wmBean != null) {
name = _wmBean.getName();
}
return name;
|
public java.lang.String | getName()Return the name of the web application (as specified in server.xml)
String name = null;
if (_wmBean != null) {
StringBuffer buffer = new StringBuffer();
String appName = getAppName();
if (appName != null) {
// Include the application id (if this is not a
// standalone web module)
buffer.append(appName);
buffer.append(Constants.NAME_SEPARATOR);
}
buffer.append(getModuleName());
name = buffer.toString();
}
return name;
|
public java.lang.ClassLoader | getParentLoader()Return the parent classloader for the web application.
return _parentLoader;
|
public java.lang.String | getStubPath()Gets the stub path of this web application.
return getWebDir(stubBaseDir);
|
public java.lang.String | getVirtualServers()Return the list of virtual servers to which the web application is
deployed.
/*String vsIDs = null;
if (_wmBean != null) {
vsIDs = _wmBean.getVirtualServers();
}
*/
return _vsIDs;
|
private java.lang.String | getWebDir(java.lang.String baseDir)
String workDir = null;
if (baseDir != null) {
StringBuffer dir = new StringBuffer();
dir.append(baseDir);
// Append the application id (if this is not a standalone web
// module)
String appName = getAppName();
if (appName != null) {
dir.append(File.separator);
dir.append(FileUtils.makeLegalNoBlankFileName(appName));
}
// Append the web module id
String name = getModuleName();
if (name != null) {
dir.append(File.separator);
if (appName == null) {
dir.append(FileUtils.makeLegalNoBlankFileName(name));
} else {
// for embedded web module, we convert the
// ".war" to "_war" when needed
dir.append(DeploymentUtils.getRelativeEmbeddedModulePath(
dir.toString(), name));
}
}
workDir = dir.toString();
}
return workDir;
|
public java.lang.String | getWorkDir()Return the work directory for this web application.
The work directory is either
generated/j2ee-apps/$appID/$moduleID
or
generated/j2ee-modules/$moduleID
return getWebDir(_baseDir);
|
public void | setBean(com.sun.enterprise.config.serverbeans.WebModule wmBean)Set the elements of information specified in the web-module element
in server.xml.
// ------------------------------------------------------------- Properties
_wmBean = wmBean;
|
public void | setDescriptor(com.sun.enterprise.deployment.WebBundleDescriptor wbd)Set the deployment descriptor object describing the contents of the
web application.
_wbd = wbd;
|
public void | setParentLoader(java.lang.ClassLoader parentLoader)Set the parent classloader for the web application.
_parentLoader = parentLoader;
|
public void | setStubBaseDir(java.lang.String stubBaseDir)Sets the base directory of this web application's stub path.
this.stubBaseDir = stubBaseDir;
|
public void | setVirtualServers(java.lang.String virtualServers)Return the list of virtual servers to which the web application is
deployed.
_vsIDs = virtualServers;
|
public void | setWorkDirBase(java.lang.String baseDir)Set the base work directory for this web application.
The actual work directory is a subdirectory (using the name of the
web application) of this base directory.
_baseDir = baseDir;
|