The problem is that my JSP uses relative paths to reference CSS files. These 
paths work fine in the static mode, i.e. when I open JSP file directly in the 
browser without deploying it on Tomcat. However, when I deploy the JSP all 
relative links stop working.

Here is an example. Suppose I have the following directory structure:
WEB-INF/jsp/Test.jsp
css/Styles.css

I need to reference Styles.css from Test.jsp in such a way that it works in 
static as well as in deployed mode. Note that for this to work in the static 
mode (no web servers or servlet containers) all paths should be relative. 
Therefore, when I deploy Test.jsp I want Tomcat either to handle relative paths 
correctly or ignore the path altogether and just serve all CSS file from a 
certain location (directory or URL).

The goal of all this is to maintain only one source tree used by web designers 
and Tomcat administrator and avoid changing paths in JSP files during 
deployment.

I would appreciate any feedback on this.

Thanks.






Hassan Schroeder <[EMAIL PROTECTED]> wrote: On 7/2/06, Alec Swan  wrote:

> I have a servlet, which I deploy as a WAR file. I want this servlet to 
> service all .jsp requests, but have Tomcat service .css files from /site/css/ 
> directory inside the servlet WAR file. I don't want Tomcat to invoke my 
> servlet when serving CSS files.

So what's the problem? You map your servlet to *.jsp, and everything
else goes to the DefaultServlet. Right?

How is this not working?
-- 
Hassan Schroeder ------------------------ [EMAIL PROTECTED]

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to