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 context root / Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "context root /" Watch "context root /" New topic
Author

context root /

Esteban Puertas
Greenhorn

Joined: Mar 23, 2008
Posts: 22
Hi!,
I hope this is the right place to post this question.
I would like to know if using a context root / for an war module is a good or bad practice....

Thank you
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61753
    
  67

You question is very vague. Please elaborate.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Esteban Puertas
Greenhorn

Joined: Mar 23, 2008
Posts: 22
We have developed one war module and now we have to deploy it but I was thinking if using a context root / is a good idea. What are the pros and cons of using a context root / for a web module ?
karthikeyan Chockalingam
Ranch Hand

Joined: Sep 06, 2003
Posts: 259
Let us assume you have this web application deployed at www.abcsomeweburl12.com with context root /. In future if you change the context root as xyz [which can be done in a single place] for some reason, the access should be www.abcsomeweburl12.com/xyz.

The impact is any existing links [in discussion forums, blogs] etc to your application will be broken.
[ May 19, 2008: Message edited by: karthi keyan ]

http://www.skillassert.com


Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If the links are formed correctly they will not be broken when the context path name changes.

See:
http://faq.javaranch.com/java/ResourceUrlProblems


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

Joined: Sep 06, 2003
Posts: 259
If the links are formed correctly they will not be broken when the context path name changes.


I apologize for lack of clarity in my previous comment. It should have been


The impact is any existing external links [in external discussion forums, blogs etc that are not under our control] referring to the application will be broken. For example the bookmarks [or favorites] in the browser [of a visitor] will become invalid
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: context root /