aspose file tools*
The moose likes Struts and the fly likes How to set the context path to root of the website Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to set the context path to root of the website" Watch "How to set the context path to root of the website" New topic
Author

How to set the context path to root of the website

Abhilash Chander
Ranch Hand

Joined: Oct 18, 2009
Posts: 39
Hi All, I have uploaded my .WAR file on to the server and deployed it. But now the URL by which it is accessible is

http://example.com/myapp/

where myapp, is the name of the WAR file that I uploaded on to the server.

I want to know how can I set it to

http://example.com/

that is, skip the name of the WAR file in the website context path. I tried setting the path= "/" in context.xml but was of no use. Kindly suggest some way to do it.

Thanks in advance
vijin das
Ranch Hand

Joined: Jun 07, 2010
Posts: 129

Abhilash Chander wrote:Hi All, I have uploaded my .WAR file on to the server and deployed it. But now the URL by which it is accessible is

http://example.com/myapp/

where myapp, is the name of the WAR file that I uploaded on to the server.

I want to know how can I set it to

http://example.com/

that is, skip the name of the WAR file in the website context path. I tried setting the path= "/" in context.xml but was of no use. Kindly suggest some way to do it.

Thanks in advance


please Specify your server is it Tomcat ........ specify version also ..........


VIJINDAS
Hardik N Shah
Greenhorn

Joined: Jul 14, 2010
Posts: 7
Another logical way i can suggest is you can set redirect in your welcome page of application.


Hardik Shah
Java/J2ee Expert
vijin das
Ranch Hand

Joined: Jun 07, 2010
Posts: 129

please check
RESIN CONFIG
which may help you
 
Don't get me started about those stupid light bulbs.
 
subject: How to set the context path to root of the website