Skip to content

Commit

Permalink
Issue #9925 Also use current context for alternate getServletContextH…
Browse files Browse the repository at this point in the history
…andler method
  • Loading branch information
janbartel committed Jun 21, 2023
1 parent b5360f3 commit c8cb4cb
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ public static ServletContextHandler getServletContextHandler(ServletContext serv
{
if (servletContext instanceof ServletContextApi servletContextApi)
return servletContextApi.getContext().getServletContextHandler();
ServletContextHandler sch = getCurrentServletContextHandler();
if (sch != null)
return sch;
throw new IllegalStateException("No Jetty ServletContextHandler, " + purpose + " unavailable");
}

Expand Down

0 comments on commit c8cb4cb

Please sign in to comment.