difin commented on code in PR #5652:
URL: https://github.com/apache/hive/pull/5652#discussion_r2010262432
##########
common/src/java/org/apache/hive/http/HttpServer.java:
##########
@@ -489,13 +496,13 @@ static boolean userHasAdministratorAccess(ServletContext
servletContext,
/**
* Create the web context for the application of specified name
*/
- WebAppContext createWebAppContext(Builder b) {
+ WebAppContext createWebAppContext(Builder b) throws FileNotFoundException {
WebAppContext ctx = new WebAppContext();
setContextAttributes(ctx.getServletContext(), b.contextAttrs);
ctx.getServletContext().getSessionCookieConfig().setHttpOnly(true);
ctx.setDisplayName(b.name);
- ctx.setContextPath("/");
- ctx.setWar(appDir + "/" + b.name);
+ ctx.setContextPath(b.contextPath == null ? "/" : b.contextPath);
+ ctx.setWar(getWebAppsPath(b.name) + "/" + b.name);
Review Comment:
`ctx.setContextPath(b.contextPath == null ? "/" : b.contextPath);` is not
needed, refactored to `ctx.setContextPath(b.contextPath)` because it it always
set. This is needed because 2 web apps cannot have the same context path on the
same web server. Health check web app has a different context path than WebUI.
`ctx.setWar(getWebAppsPath(b.name) + "/" + b.name);` is needed because each
web app has a different app dir. See `service/target/hive-webapps/ `
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]