That is what struts does for you already. You do not need to do anything. Suppose you do your development in context /app. While you develop all of your actions will be rendered like /apps/action.do Now suppose you want to deploy your application, you give it to administrator and he/she deploys it in some context. Suppose that context is / all of your actions will be rendered like /action.do. Sure if he/she deploys the app in context /apps1 all of your actions will be rendered as /apps1/action.do
This basically has very little to do with struts rather with how servlets/JSP apps get deployed. Struts just makes the fact that you can move your app around transparent to you as a developer or to your admin, given you use the struts tags. > -----Original Message----- > From: java-dude [mailto:[EMAIL PROTECTED] > Sent: Tuesday, August 19, 2003 10:09 AM > To: [EMAIL PROTECTED] > Subject: Re: Changing application path > > The business requires to put their own URL on the application such > as :- > > www.somecompany.com/example > > NOT as is currently happening :- > > www.somecompany.com/app/example > > where the app part of the URL is coming from app.war used to deploy > the app. > > If I can tweak the config of the application so the form action path > becomes "/example" instead of "/app/example", as currently, then it > should be possible for the system administrator to remap the > application to www.someapp.com/example > > This must be already being done in numerous companies but I don't > know how we can achieve this at the moment. > > --- In [EMAIL PROTECTED], "Alex Shneyderman" <[EMAIL PROTECTED]> wrote: > > > > The way container works is to deploy an application to its own > content. > > The way your container knows which application a user request > refers to > > is by looking at the prefix of the request. So unless you mount > your > > application onto the ROOT content (prefix "/") I can not imagine > what > > you are asking for is possible. But then again if some dude will > come > > along and remount your app to some /app content ... Suppose you > develop > > an app called app1 and have example.do action there. How would you > > differentiate between /app/example.do and /app1/example.do? > > > > HTH, > > Alex. > > > > > -----Original Message----- > > > From: java-dude [mailto:[EMAIL PROTECTED] > > > Sent: Tuesday, August 19, 2003 7:23 AM > > > To: [EMAIL PROTECTED] > > > Subject: Changing application path > > > > > > Hi, > > > > > > I need to change the base path of my struts application so that > > > there is no prefix on the form actions. > > > > > > For example if my application is deployed in the application > server > > > as app.war and I view the source for a jsp with a form on it, say > > > example.jsp, in internet explorer, I see that the form has an > action > > > tag as follows :- > > > > > > action="/app/example.do" > > > > > > This is happening even though the jsp is actually coded with > action > > > tag as follows :- > > > > > > action="example" > > > > > > > > > Basically I would like the generated source for this page to be > > > without the base of the path as follows :- > > > > > > action="/example.do" > > > > > > I am guessing it may require manipulation of the web.xml and/or > > > struts-config.xml files but I am not sure, and if so how ? > > > > > > Suhel Rizvi > > > > > > > > > ----------------------------------------------------------------- > ---- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > ------------------------------------------------------------------- > -- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]