use of org.dbflute.tomcat.TomcatBoot in project fess by codelibs.
the class FessBoot method main.
// ===================================================================================
// main
// ============
public static void main(final String[] args) {
// update java.io.tmpdir
final String tempPath = System.getProperty(FESS_TEMP_PATH);
if (tempPath != null) {
System.setProperty(JAVA_IO_TMPDIR, tempPath);
}
final TomcatBoot tomcatBoot = //
new FessBoot(getPort(), getContextPath()).useTldDetect();
if (tempPath != null) {
tomcatBoot.atBaseDir(new File(tempPath, "webapp").getAbsolutePath());
}
final String tomcatConfigPath = getTomcatConfigPath();
if (tomcatConfigPath != null) {
// e.g. URIEncoding
tomcatBoot.configure(tomcatConfigPath);
}
tomcatBoot.logging(LOGGING_PROPERTIES, op -> {
op.ignoreNoFile();
String fessLogPath = System.getProperty("fess.log.path");
if (fessLogPath == null) {
fessLogPath = "../../logs";
}
op.replace("fess.log.path", fessLogPath.replace("\\", "/"));
}).asYouLikeIt(resource -> {
final Host host = resource.getHost();
if (host instanceof StandardHost) {
((StandardHost) host).setErrorReportValveClass(SuppressErrorReportValve.class.getName());
}
}).useTldDetect(jarName -> (jarName.contains("jstl") || jarName.contains("lasta-taglib"))).asDevelopment(isNoneEnv()).bootAwait();
}
Aggregations