Closed sharadr closed 12 years ago
You have to unpack the war and build your context for the unpacked war. This is why you got that error. You are attempting to autodeploy.
I am not attempting to autodeploy. We want to run the app as /yana so that it does not deploy in the root context as /
The end user should be able to change the context of the application ie. take the app, drop it into $CATALINA_BASE/webapps/yana.war and the app should run with the context as /yana/
The end user should not have to do any other steps.
Yes this is not a necessary change just a different way of thinking when deploying; something that we already discussed.
You will have to change alot of the paths if you do this I believe. But leaving it as is is not going to really hurt anything as it can be deployed perfectly fine within existing environments under a subdomain which is quite common for web application deployment.
PHP/Python/Ruby and many other web apps follow this exact same procedure when deploying multiple webapps in the some environment... especially if they are from different vendors.
In java however, when proxying to virtual hosts, it is common to use the appname to differentiate which is useful. It's not necessary but alot of people find it helpfuland those who don't know how to configure ajp proxying for vhosts without the appname can get confused so there is an good argument to be made for having the appname in the context.
this is working for me. I can deploy to a non-root context for tomcat and it works.
I added these config values to my external yana-config.properties
grails.serverURL=http://localhost:8080/yana2
grails.plugins.springsecurity.portMapper.httpPort=8080
grails.plugins.springsecurity.portMapper.httpsPort=8443
oh good. I was afraid that I might have missed some pathing in the controllers or views that made this a bit more difficult. Excellent. Good to hear. wipes brow
Yana war if deployed as a war in tomcat does not work if it is deployed in non-root context.
Steps to reproduce: grails prod war
Take target/yana2-0.1.war and deploy to $CATALINA_BASE/webapps/yana.war Server starts up but on access of first service throws an exception that the resources could not be loaded. The assumption was that Config.groovy has app.context=/ which needs to be overridden in config.properties which when done causes an infinite redirect for firefox and the splash page does not render.