You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This no longer works using Jetty 12, as the way this init parameter is loaded in the DefaultServlet has changed. The parameter is renamed, but there is also a new getInitParameter method is added, to provide backwards compatibility for the old name.
privateStringgetInitParameter(Stringname, String... deprecated)
{
Stringvalue = super.getInitParameter(name);
if (value != null)
returnvalue;
for (Stringd : deprecated)
{
value = super.getInitParameter(d);
if (value != null)
{
LOG.warn("Deprecated {} used instead of {}", d, name);
returnvalue;
}
}
returnnull;
}
This method does not use the getInitParameter(String) from the DefaultServlet.
publicStringgetInitParameter(Stringname)
{
Stringvalue = getServletContext().getInitParameter(CONTEXT_INIT + name);
if (value == null)
value = super.getInitParameter(name);
returnvalue;
}
The method tries to fetch init parameters from the ServletContext (with the CONTEXT_INIT prefix) first and then falls back to the ServletConfig.
I think the getInitParameter(String,String) should be altered so that it uses the getInitParameter(String) from the DefaultServlet
The text was updated successfully, but these errors were encountered:
Jetty version(s)
12.0.5
Jetty Environment
ee10
Java version/vendor
21.0.1
OS type/version
MacOS 14.2.1
Description
We use the Spring boot ServletContextInitializer to set the init parameter baseResource/resourceBase.
This no longer works using Jetty 12, as the way this init parameter is loaded in the DefaultServlet has changed. The parameter is renamed, but there is also a new getInitParameter method is added, to provide backwards compatibility for the old name.
This method does not use the getInitParameter(String) from the DefaultServlet.
The method tries to fetch init parameters from the ServletContext (with the CONTEXT_INIT prefix) first and then falls back to the ServletConfig.
I think the getInitParameter(String,String) should be altered so that it uses the getInitParameter(String) from the DefaultServlet
The text was updated successfully, but these errors were encountered: