本文整理了Java中org.apache.catalina.Container.getCatalinaBase()
方法的一些代码示例,展示了Container.getCatalinaBase()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Container.getCatalinaBase()
方法的具体详情如下:
包路径:org.apache.catalina.Container
类名称:Container
方法名:getCatalinaBase
暂无
代码示例来源:origin: codefollower/Tomcat-Research
@Override
public File getCatalinaBase() {
if (parent == null) {
return null;
}
return parent.getCatalinaBase();
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
@Override
public File getCatalinaBase() {
if (parent == null) {
return null;
}
return parent.getCatalinaBase();
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
@Override
public File getCatalinaBase() {
if (parent == null) {
return null;
}
return parent.getCatalinaBase();
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
private File getDirectoryFile() {
File dir = new File(directory);
if (!dir.isAbsolute()) {
dir = new File(getContainer().getCatalinaBase(), directory);
}
return dir;
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
private File getDirectoryFile() {
File dir = new File(directory);
if (!dir.isAbsolute()) {
dir = new File(getContainer().getCatalinaBase(), directory);
}
return dir;
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
@Override
protected void initInternal() throws LifecycleException {
super.initInternal();
// Kerberos configuration file location
String krb5Conf = System.getProperty(Constants.KRB5_CONF_PROPERTY);
if (krb5Conf == null) {
// System property not set, use the Tomcat default
File krb5ConfFile = new File(container.getCatalinaBase(),
Constants.DEFAULT_KRB5_CONF);
System.setProperty(Constants.KRB5_CONF_PROPERTY,
krb5ConfFile.getAbsolutePath());
}
// JAAS configuration file location
String jaasConf = System.getProperty(Constants.JAAS_CONF_PROPERTY);
if (jaasConf == null) {
// System property not set, use the Tomcat default
File jaasConfFile = new File(container.getCatalinaBase(),
Constants.DEFAULT_JAAS_CONF);
System.setProperty(Constants.JAAS_CONF_PROPERTY,
jaasConfFile.getAbsolutePath());
}
}
代码示例来源:origin: codefollower/Tomcat-Research
private File getAbsolutePath(String path) {
File dir = new File(path);
if (!dir.isAbsolute()) {
dir = new File(getCluster().getContainer().getCatalinaBase(),
dir.getPath());
}
try {
dir = dir.getCanonicalFile();
} catch (IOException e) {// ignore
}
return dir;
}
}
代码示例来源:origin: codefollower/Tomcat-Research
@Override
protected void initInternal() throws LifecycleException {
super.initInternal();
// Kerberos configuration file location
String krb5Conf = System.getProperty(Constants.KRB5_CONF_PROPERTY);
if (krb5Conf == null) {
// System property not set, use the Tomcat default
File krb5ConfFile = new File(container.getCatalinaBase(),
Constants.DEFAULT_KRB5_CONF);
System.setProperty(Constants.KRB5_CONF_PROPERTY,
krb5ConfFile.getAbsolutePath());
}
// JAAS configuration file location
String jaasConf = System.getProperty(Constants.JAAS_CONF_PROPERTY);
if (jaasConf == null) {
// System property not set, use the Tomcat default
File jaasConfFile = new File(container.getCatalinaBase(),
Constants.DEFAULT_JAAS_CONF);
System.setProperty(Constants.JAAS_CONF_PROPERTY,
jaasConfFile.getAbsolutePath());
}
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina-ha
private File getAbsolutePath(String path) {
File dir = new File(path);
if (!dir.isAbsolute()) {
dir = new File(getCluster().getContainer().getCatalinaBase(),
dir.getPath());
}
try {
dir = dir.getCanonicalFile();
} catch (IOException e) {// ignore
}
return dir;
}
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
@Override
protected void initInternal() throws LifecycleException {
super.initInternal();
// Kerberos configuration file location
String krb5Conf = System.getProperty(Constants.KRB5_CONF_PROPERTY);
if (krb5Conf == null) {
// System property not set, use the Tomcat default
File krb5ConfFile = new File(container.getCatalinaBase(),
Constants.DEFAULT_KRB5_CONF);
System.setProperty(Constants.KRB5_CONF_PROPERTY,
krb5ConfFile.getAbsolutePath());
}
// JAAS configuration file location
String jaasConf = System.getProperty(Constants.JAAS_CONF_PROPERTY);
if (jaasConf == null) {
// System property not set, use the Tomcat default
File jaasConfFile = new File(container.getCatalinaBase(),
Constants.DEFAULT_JAAS_CONF);
System.setProperty(Constants.JAAS_CONF_PROPERTY,
jaasConfFile.getAbsolutePath());
}
}
代码示例来源:origin: codefollower/Tomcat-Research
dir = new File(getContainer().getCatalinaBase(), directory);
代码示例来源:origin: codefollower/Tomcat-Research
file = new File(getContainer().getCatalinaBase(), pathname);
if (!file.exists() || !file.canRead()) {
log.warn("Cannot load configuration file " + file.getAbsolutePath());
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
private boolean sendErrorPage(String location, Response response) {
File file = new File(location);
if (!file.isAbsolute()) {
file = new File(getContainer().getCatalinaBase(), location);
}
if (!file.isFile() || !file.canRead()) {
getContainer().getLogger().warn(
sm.getString("errorReportValve.errorPageNotFound", location));
return false;
}
// Hard coded for now. Consider making this optional. At Valve level or
// page level?
response.setContentType("text/html");
response.setCharacterEncoding("UTF-8");
try (OutputStream os = response.getOutputStream();
InputStream is = new FileInputStream(file);){
IOTools.flow(is, os);
} catch (IOException e) {
getContainer().getLogger().warn(
sm.getString("errorReportValve.errorPageIOException", location), e);
return false;
}
return true;
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
private boolean sendErrorPage(String location, Response response) {
File file = new File(location);
if (!file.isAbsolute()) {
file = new File(getContainer().getCatalinaBase(), location);
}
if (!file.isFile() || !file.canRead()) {
getContainer().getLogger().warn(
sm.getString("errorReportValve.errorPageNotFound", location));
return false;
}
// Hard coded for now. Consider making this optional. At Valve level or
// page level?
response.setContentType("text/html");
response.setCharacterEncoding("UTF-8");
try (OutputStream os = response.getOutputStream();
InputStream is = new FileInputStream(file);){
IOTools.flow(is, os);
} catch (IOException e) {
getContainer().getLogger().warn(
sm.getString("errorReportValve.errorPageIOException", location), e);
return false;
}
return true;
}
代码示例来源:origin: codefollower/Tomcat-Research
file = new File(getContainer().getCatalinaBase(), pathname);
if (!file.exists() || !file.canRead())
throw new LifecycleException
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
cb.setText(authMethod);
} else if (cb.getPrompt().equals("catalinaBase")) {
cb.setText(realm.getContainer().getCatalinaBase().getAbsolutePath());
} else {
throw new UnsupportedCallbackException(callbacks[i]);
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
cb.setText(authMethod);
} else if (cb.getPrompt().equals("catalinaBase")) {
cb.setText(realm.getContainer().getCatalinaBase().getAbsolutePath());
} else {
throw new UnsupportedCallbackException(callbacks[i]);
内容来源于网络,如有侵权,请联系作者删除!