Re: How to disable devMode in prod
👍 thanks Lukasz.. On Wed, Oct 12, 2016 at 4:47 PM, Lukasz Lenart wrote: > 2016-10-12 12:43 GMT+02:00 Sreekanth S. Nair org>: > > Cool 👍 thanks Lukasz, when can we expect this release ? > > Somehow around end of this year, maybe early. > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: How to disable devMode in prod
2016-10-12 12:43 GMT+02:00 Sreekanth S. Nair : > Cool 👍 thanks Lukasz, when can we expect this release ? Somehow around end of this year, maybe early. Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to disable devMode in prod
Cool 👍 thanks Lukasz, when can we expect this release ? On Wed, Oct 12, 2016 at 3:02 PM, Lukasz Lenart wrote: > and docs > https://cwiki.apache.org/confluence/display/WW/Constant+Configuration# > ConstantConfiguration-Valuesubstitution > > 2016-10-12 11:24 GMT+02:00 Lukasz Lenart : > > Implemented > > https://issues.apache.org/jira/browse/WW-4698 > > > > 2016-09-16 9:06 GMT+02:00 Christoph Nenning < > christoph.nenn...@lex-com.net>: > >>> Maybe the first step should be just simple, use ENV in > >>> struts.xml/struts.properties > >>> > >>> > >>> > >>> wdyt? > >>> > >>> > >> > >> +1 > >> > >> > >> > >> This Email was scanned by Sophos Anti Virus > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: How to disable devMode in prod
and docs https://cwiki.apache.org/confluence/display/WW/Constant+Configuration#ConstantConfiguration-Valuesubstitution 2016-10-12 11:24 GMT+02:00 Lukasz Lenart : > Implemented > https://issues.apache.org/jira/browse/WW-4698 > > 2016-09-16 9:06 GMT+02:00 Christoph Nenning : >>> Maybe the first step should be just simple, use ENV in >>> struts.xml/struts.properties >>> >>> >>> >>> wdyt? >>> >>> >> >> +1 >> >> >> >> This Email was scanned by Sophos Anti Virus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to disable devMode in prod
Implemented https://issues.apache.org/jira/browse/WW-4698 2016-09-16 9:06 GMT+02:00 Christoph Nenning : >> Maybe the first step should be just simple, use ENV in >> struts.xml/struts.properties >> >> >> >> wdyt? >> >> > > +1 > > > > This Email was scanned by Sophos Anti Virus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to disable devMode in prod
> Maybe the first step should be just simple, use ENV in > struts.xml/struts.properties > > > > wdyt? > > +1 This Email was scanned by Sophos Anti Virus
Re: How to disable devMode in prod
It used to be that you could use an include statements in the struts.xml, e.g. . We used this to allow for different settings in production and development by importing different files. This could be a nice “pair” if you can specify environment variables. - adam -- _ Adam Brin Director of Technology, Digital Antiquity 480.965.1278 > On Sep 15, 2016, at 8:00 AM, Lukasz Lenart wrote: > > Maybe the first step should be just simple, use ENV in > struts.xml/struts.properties > > > > wdyt? > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to disable devMode in prod
Would be great to start with :-) -- Thanks & Regards Sreekanth Nair Java Developer On Thu, Sep 15, 2016 at 8:30 PM, Lukasz Lenart wrote: > Maybe the first step should be just simple, use ENV in > struts.xml/struts.properties > > > > wdyt? > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: How to disable devMode in prod
Maybe the first step should be just simple, use ENV in struts.xml/struts.properties wdyt? Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to disable devMode in prod
Adding one of my thought, it would be better if we can externalize the System ENV property key name (in Christoph code the key is "environment"), because the application may already having some key to set its environment to prod, staging or dev, etc. eg: if we are using spring its having *spring.profiles.active *as to set its current environment. -- Thanks & Regards Sreekanth Nair Java Developer
Re: How to disable devMode in prod
> >> Hi, > >> > >> Do you have a solution to disable devMode in production environment? > >> Based on some ENV variable or something? > > > > Yes, we register a configProvider in web.xml which disables devMode based > > on a system property. > > Can you share source code of the provider? > > Due to our 4 staging environments we have a custom configuration library which gives us environment specific config. That lib is used in struts-config-provider. Without the lib code would look something like this: public class DevModeConfigProvider implements ConfigurationProvider { public void register(ContainerBuilder builder, LocatableProperties props) throws ConfigurationException { if ("dev".equals(System.getProperty("environment"))) { props.put("struts.devMode", "true"); } } } regards, Christoph This Email was scanned by Sophos Anti Virus
Re: How to disable devMode in prod
2016-09-15 13:35 GMT+02:00 Christoph Nenning : >> Hi, >> >> Do you have a solution to disable devMode in production environment? >> Based on some ENV variable or something? > > Yes, we register a configProvider in web.xml which disables devMode based > on a system property. Can you share source code of the provider? Thanks in advance -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to disable devMode in prod
+1 for this change, it would be wonderful if this can be done. -- Thanks & Regards Sreekanth Nair Java Developer On Thu, Sep 15, 2016 at 5:21 PM, Christoph Nenning < christoph.nenn...@lex-com.net> wrote: > > >> Hi, > > >> > > >> Do you have a solution to disable devMode in production environment? > > >> Based on some ENV variable or something? > > > > > > Yes, we register a configProvider in web.xml which disables devMode > based > > > on a system property. > > > > Maybe it would be good to add such feature directly to Struts Core? > > > > > > Yeah, that would surly make it simpler for quite a lot of people. > > How shall we call that property? > > struts.environment? > struts.staging? > struts.production? > > What value(s) shall we use? > Boolean? > Strings like 'prod', 'test', 'dev', 'qa', 'staging'? > > > Make name and value(s) configurable? > > > At work we have 4 staging environments thus our property is not boolean. > > > regards, > Christoph > > This Email was scanned by Sophos Anti Virus >
Re: How to disable devMode in prod
> >> Hi, > >> > >> Do you have a solution to disable devMode in production environment? > >> Based on some ENV variable or something? > > > > Yes, we register a configProvider in web.xml which disables devMode based > > on a system property. > > Maybe it would be good to add such feature directly to Struts Core? > > Yeah, that would surly make it simpler for quite a lot of people. How shall we call that property? struts.environment? struts.staging? struts.production? What value(s) shall we use? Boolean? Strings like 'prod', 'test', 'dev', 'qa', 'staging'? Make name and value(s) configurable? At work we have 4 staging environments thus our property is not boolean. regards, Christoph This Email was scanned by Sophos Anti Virus
Re: How to disable devMode in prod
2016-09-15 13:35 GMT+02:00 Christoph Nenning : >> Hi, >> >> Do you have a solution to disable devMode in production environment? >> Based on some ENV variable or something? > > Yes, we register a configProvider in web.xml which disables devMode based > on a system property. Maybe it would be good to add such feature directly to Struts Core? Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to disable devMode in prod
> Hi, > > Do you have a solution to disable devMode in production environment? > Based on some ENV variable or something? > > Yes, we register a configProvider in web.xml which disables devMode based on a system property. regards, Christoph This Email was scanned by Sophos Anti Virus