Hello, I am using 5.0.18 and want to conditionally deploy my web app for http (development) and https (production) without changing source code - that is putting @Secure on page class.
I tried public void contributeMetaDataLocator(MappedConfiguration<String, String> configuration, @Symbol(SymbolConstants.PRODUCTION_MODE) boolean productionMode) { if (productionMode) { configuration.add(MetaDataConstants.SECURE_PAGE, "true"); } else { configuration.add(MetaDataConstants.SECURE_PAGE, "false"); } } but this does not work. If I put @Secure on my page classes the form submission works under https in production environment. I know 5.1 introduced "configurable" @Secure but using snapshot version is not an option. What is wrong with the above method? Cheers, Borut 2008/11/13 natamah <mahesh.natara...@db.com> > > Eric, > > I found a way around this, by adding a method to AppModule.java under > com.db.dbiq.services. > > public void contributeMetaDataLocator(MappedConfiguration<String,String> > configuration) > { > if (HttpHelper.isProduction()) { > configuration.add(MetaDataConstants.SECURE_PAGE, "true"); > } > else { > configuration.add(MetaDataConstants.SECURE_PAGE, "false"); > } > } > > In my case, the production sites are secure and the development ones are > not. You can substitute HttpHelper.isProduction() with some relevant code. > > There is also a way to secure individual pages by adding the @Secure > notation but my local testing got > disturbed when I used this notation. > > Hope this helps. > > Mahesh. > > > > Eric Ma wrote: > > > > Running version 5.0.15. > > > > Form submission works well in HTTP. Under HTTPS, T5 complains "Error: > > Forms require that the request method be POST and that the t:formdata > > query parameter have values.". > > > > It seems 5.0.15 introduced a feature to block form GET. See > > https://issues.apache.org/jira/browse/TAPESTRY-2563. > > > > Any suggestions how to work around this? > > > > Thanks, > > > > -- > View this message in context: > http://www.nabble.com/-T5--Form-submission-via-POST-and-problem-under-HTTPS-tp19925747p20481672.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > >