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 (#9941)
  • Loading branch information
janbartel authored Jun 22, 2023
1 parent b9ca6d2 commit 3f159fc
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 3f159fc

Please sign in to comment.