Production mode in context.xml file

I deoply my applications to a Tomcat 8 server.
Deploying it I don’t like to change my web.xml in order t tut the target system in the production mode.
Is there any way to externalize that information outside the war (I do the same for context.xml informations) ?
Tks

Yes. You can add @VaadinServletConfiguration(productionMode = true, ui = MyUI.class) annotation to your servlet. Usually it is in same class as MyUI, something like public static class Servlet extends VaadinServlet { … }. Note, that if you have web.xml and production mode is set to false there, it has higher priority.

Tks for Your help but this doesn’t solve my problem.
Annotation is bound to the code more than web.xml.
I need to have the possibility to change from debug to production and viceversa from outside my war file.
Could You suggest a way ?
Tks

I seem to recall you can use a system property for that. Maybe you can find something with that information?

Try adding to your JVM or application server the system property
vaadin.productionMode
with value
true
.

In Jboss this could be done like
explained here
.