This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Struts and the fly likes Change application directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Change application directory" Watch "Change application directory" New topic
Author

Change application directory

Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2578

This should be easy, but somehow I am little confused. I have done this for JSP/Sevlets, but I don't know what all things are requited to be changed if I need to change my application directory using struts from ROOT to another directory (I am using struts with velocity and not JSP). Will few changes in web.xml suffice or is more work required here?

As of now it gets serverd as -
http://wwww.mydomain.com/index.do
I want to make it -
http://wwww.mydomain.com/xyz/index.do

What all code changes will be required here?

- Manish
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Add the context root to your .war file. I think that's it.


A good workman is known by his tools.
Manish Hatwalne
Ranch Hand

Joined: Sep 22, 2001
Posts: 2578

Originally posted by Marc Peabody:
Add the context root to your .war file. I think that's it.


Mind elaborating more? I think I have tried what you're suggesting, but it doesn't seem to be as simple as that.
 
 
subject: Change application directory
 
Similar Threads
Struts - how to prepend to the URL?
Dynamic path configuration/resolving
Not direct to localhost:8080/test/index.do and show This is my JSP page?
Question on Struts Portlet framework WebSphere
Welcome file list and directory listing