Skip to content

Commit

Permalink
Improved javadoc of the DefaultServlet
Browse files Browse the repository at this point in the history
Build documentation examples
  • Loading branch information
gregw committed Jul 3, 2024
1 parent 4e1520b commit bfee2d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ public void resourceServlet()
// Add the ResourceServlet to serve static content from a specific location.
ServletHolder servletHolder = context.addServlet(ResourceServlet.class, "/static/*");
// Configure the ResourceServlet with init-parameters.
servletHolder.setInitParameter("resourceBase", "/absolute/path/to/static/resources/");
servletHolder.setInitParameter("baseResource", "/absolute/path/to/static/resources/");
servletHolder.setInitParameter("pathInfoOnly", "true");
servletHolder.setAsyncSupported(true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ public void defaultServlet()
// Add the DefaultServlet to serve static content.
ServletHolder servletHolder = context.addServlet(DefaultServlet.class, "/");
// Configure the DefaultServlet with init-parameters.
servletHolder.setInitParameter("resourceBase", "/path/to/static/resources/");
servletHolder.setInitParameter("baseResource", "/path/to/static/resources/");
servletHolder.setAsyncSupported(true);
// end::defaultServlet[]
}
Expand Down

0 comments on commit bfee2d0

Please sign in to comment.