Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Run multiple instances of the same WAR servlet and pass it a config value

You could call the method setInitParameter(String,String) via the context xml that defines the webapp, then you can retrieve it in the init() of your servlet via the ServletConfig.getInitParameter(String).

Jan

On Thu, 5 Oct 2023 at 06:42, Alexander Farber via jetty-users <jetty-users@xxxxxxxxxxx> wrote:
Apologies, the getServletConfig().getContextPath() in the init() of my servlet works well, that probably had been a problem in my VS Code.

Still I wonder, if I would set a "property" with a "name" and "value" as described in the "Jetty XML Syntax" section https://eclipse.dev/jetty/documentation/jetty-10/operations-guide/index.html#og-xml - how could I retrieve the value in the servlet?

Best regards
Alex


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jetty-users


--
Jan Bartel <janb@xxxxxxxxxxx>
www.webtide.com
Expert assistance from the creators of Jetty and CometD


Back to the top