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).


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 - how could I retrieve the value in the servlet?

Best regards

jetty-users mailing list
To unsubscribe from this list, visit

Jan Bartel <janb@xxxxxxxxxxx>
Expert assistance from the creators of Jetty and CometD

Back to the top