dlmarion commented on code in PR #5942:
URL: https://github.com/apache/accumulo/pull/5942#discussion_r2538103820
##########
server/monitor/src/main/java/org/apache/accumulo/monitor/Monitor.java:
##########
@@ -460,15 +459,12 @@ public void run() {
log.info("stop requested. exiting ... ");
}
- private ServletHolder getDefaultServlet() {
- return new ServletHolder(new DefaultServlet() {
- private static final long serialVersionUID = 1L;
-
- @Override
- public Resource getResource(String pathInContext) {
- return Resource.newClassPathResource("/org/apache/accumulo/monitor" +
pathInContext);
- }
- });
+ private ServletHolder getResourcesServlet() {
+ ServletHolder holder = new ServletHolder("resources",
ResourceServlet.class);
+ holder.setInitParameter("dirAllowed", "false");
+ holder.setInitParameter("baseResource", Monitor.class.getClassLoader()
+
.getResource("org/apache/accumulo/monitor/resources").toExternalForm());
Review Comment:
Updated this in 4efb020 and tested locally. Appears to work.
--
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]