Re: [jetty-users] Run multiple instances of the same WAR servlet and pass it a config value

2023-10-04 Thread Joakim Erdfelt via jetty-users
In your /var/www/jetty-base-de/webapps/de.xml, you can set a init-parameter that can be accessed from the ServletContext.getInitParameter() Example: http://www.eclipse.org/jetty/configure_10_0.dtd;> /de /var/www/words-5.0.war

Re: [jetty-users] Run multiple instances of the same WAR servlet and pass it a config value

2023-10-04 Thread Jan Bartel via jetty-users
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 <

Re: [jetty-users] Run multiple instances of the same WAR servlet and pass it a config value

2023-10-04 Thread Alexander Farber via jetty-users
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

Re: [jetty-users] Run multiple instances of the same WAR servlet and pass it a config value

2023-10-04 Thread Alexander Farber via jetty-users
I try to use the following but the method is not available: @Override public void init() throws ServletException { super.init(); mLanguage = getServletConfig().getContextPath(); } ___ jetty-users mailing list