fix #2493 fix npe
This commit is contained in:
parent
abde5ed1c9
commit
7b21e0a549
1 changed files with 8 additions and 2 deletions
|
@ -131,7 +131,13 @@ public class FessBoot extends TomcatBoot {
|
|||
@Override
|
||||
protected void setupWebappContext() {
|
||||
super.setupWebappContext();
|
||||
final Context context = (Context) server.getHost().findChild(StringUtil.EMPTY);
|
||||
context.setResources(new FessWebResourceRoot(context));
|
||||
String contextPath = getContextPath();
|
||||
if (contextPath.length() > 0 && contextPath.endsWith("/")) {
|
||||
contextPath = contextPath.replaceAll("/+$", StringUtil.EMPTY);
|
||||
}
|
||||
final Context context = (Context) server.getHost().findChild(contextPath);
|
||||
if (context != null) {
|
||||
context.setResources(new FessWebResourceRoot(context));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue