On Thu, February 2, 2006 3:22 pm, Rick Reumann said: > > J T wrote the following on 1/30/2006 3:55 PM: >> We have four environments: dev, int, stg, and prod. Each of these is >> fronted >> by an apache server >> that proxies to our weblogic application server. >> >> The URLs to the apps look like this >> (dev) http://devserver.com/dev/Application >> (int) http://intserver.com/int/Application >> (stg) http://stgserver.com/stg/Application >> (prod) http://prodserver.com/Application (no directory) > > <snip> > >> ... >> <form name="myForm" method="POST" action="/Application/processMain.do"> >> <input type="text" name="mynbr" value=""> >> <input type="submit" value="Submit"> >> </form> >> >> ... >> >> So when I click submit the POST goes to >> http://devserver.com/Application/ >> and not http://devserver.com/dev/Application >> >> I don't want to hard code my struts-config since this needs be >> deployed to 4 places. > > I'm still confused though. Why would your form action be: > > action="/processMain.do"> <--- (don't use /Application) > > Isn't in this case your appname "Application"? If so I don't see the > problem. If for example you deploy "Application.war" to those four > environments, I don't see why the /dev/ part would ever be stripped off. > Everything before your context name shouldn't be affected by Struts. > > I'm probably missing something though:)
I haven't been following this thread, but on this particular point... IIRC, the "context name" is defined as the first part of the URI following the host:port/ portion. So, in the URI http://devserver.com/dev/Application the context name is actually dev, and Application is just a path underneath the context. Not sure if this helps any (or even with 100% certainty if I'm right, although this is my recollection). > > -- > Rick Frank --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]