File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes How to package Diiferent Context Root in a .WAR file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to package Diiferent Context Root in a .WAR file" Watch "How to package Diiferent Context Root in a .WAR file" New topic
Author

How to package Diiferent Context Root in a .WAR file

vijay dadhwal
Ranch Hand

Joined: Dec 02, 2008
Posts: 47

if i have a comm.war file, how do i package different context root say
/communciation in war file. So that whenever i deploy this war file on tomcat it takes context root as /communicate.

I did it successfully using server.xml <context ....>
but can i do such things from with in war file ?


MCA , SJCP
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

No. Setting up contexts is part of the container setup, not the web app setup.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Can I assume from the name of the config file (server.xml) that you're using Apache Tomcat?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
vijay dadhwal
Ranch Hand

Joined: Dec 02, 2008
Posts: 47

Yes, it's Tomacat 6

regards
vj
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to package Diiferent Context Root in a .WAR file
 
Similar Threads
Problem with contextPath
reading a properties file from the war file
Change application directory
deploy servlets !urgent
Websphere deployment