On 4/20/07, Gurram, Srinivas <[EMAIL PROTECTED]> wrote:
I am new to struts. Currently my application url is like this
http://www.site.com/contextname/Home.do  I want to change this url to
http://www.site.com/Home.do

I need to remove the contextname.


You need to change the contextroot in your application.xml file, and
if you're using WebSphere 6 with RAD 6 as your IDE, in the
.websettings file for the web project. We recently did this on the
project I'm working on. Set it to "/"; I think you can also set it to
the empty string, but I'm not certain.

We did not have to make any changes to our web.xml file, and since
this doesn't really concern Struts, no changes to struts-config.xml
should be needed. One thing you would have to change, though, are any
places in your app where the context root is currently used, perhaps
in links or menus.

If all your links and menus use relative URLs, then you will be fine.
If, like the app I'm working on, the context root was never changed
since its inception and many programmers over the years worked on it,
creating a sprawling codebase, you may find that it is hardcoded in a
number of places.

Good luck,
David Conrad

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to