Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Configuring context root

802569Oct 12 2011 — edited Oct 14 2011
This question is more related to Tomcat environment setup, but I figure that someone here will know the answer. I have five webapps on my tomcat server. For each, I would like to set a context root, so that when I reference a resource (css, js, etc) from a web page in one of these apps, I can reference it through a relative root path without having to put the webapp name in the path. For example, as it is now, I need to write
<link rel="stylesheet" type="text/css" href="/MyWebApp/css/styles.css" />
I want to set the root so that I can instead reference like
<link rel="stylesheet" type="text/css" href="/css/styles.css" />
I remember doing something similar many years back, but cannot find a solution - if there even is one.

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Nov 11 2011
Added on Oct 12 2011
4 comments
210 views