@Override public File getCatalinaBase() { if (parent == null) { return null; } return parent.getCatalinaBase(); }
@Override public File getCatalinaBase() { if (parent == null) { return null; } return parent.getCatalinaBase(); }
@Override public File getCatalinaBase() { if (parent == null) { return null; } return parent.getCatalinaBase(); }
private File getDirectoryFile() { File dir = new File(directory); if (!dir.isAbsolute()) { dir = new File(getContainer().getCatalinaBase(), directory); } return dir; }
private File getDirectoryFile() { File dir = new File(directory); if (!dir.isAbsolute()) { dir = new File(getContainer().getCatalinaBase(), directory); } return dir; }
@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()); } }
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; } }
@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()); } }
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; } }
@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()); } }
dir = new File(getContainer().getCatalinaBase(), directory);
file = new File(getContainer().getCatalinaBase(), pathname); if (!file.exists() || !file.canRead()) { log.warn("Cannot load configuration file " + file.getAbsolutePath());
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; }
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; }
file = new File(getContainer().getCatalinaBase(), pathname); if (!file.exists() || !file.canRead()) throw new LifecycleException
cb.setText(authMethod); } else if (cb.getPrompt().equals("catalinaBase")) { cb.setText(realm.getContainer().getCatalinaBase().getAbsolutePath()); } else { throw new UnsupportedCallbackException(callbacks[i]);
cb.setText(authMethod); } else if (cb.getPrompt().equals("catalinaBase")) { cb.setText(realm.getContainer().getCatalinaBase().getAbsolutePath()); } else { throw new UnsupportedCallbackException(callbacks[i]);