YARN-11597. Fix NPE when loading static files in SLSWebApp (#6216) Contributed by Junfan Zhang.

Reviewed-by: Shilun Fan <slfan1989@apache.org>
Signed-off-by: Shilun Fan <slfan1989@apache.org>
This commit is contained in:
Junfan Zhang 2023-10-27 22:11:01 +08:00 committed by GitHub
parent 7ec636deec
commit e4eda40ac9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,6 +136,7 @@ public void start() throws Exception {
String webRootDir = getClass().getClassLoader().getResource("html").
toExternalForm();
staticHandler.setResourceBase(webRootDir);
staticHandler.start();
Handler handler = new AbstractHandler() {
@Override