Roman Sokolyuk wrote:
...


header2.jsp
------------------
        <link href="../../CSS/style1.css" rel="stylesheet" type="text/css"/>
...

The CSS directory is under the app context, alongside WEB-INF.

Am I specifying the path to the CSS correctly? Anyone can suggest what else
I may be doing wrong?


I am not a JSP specialist, but I would guess that your problem is indeed with the above.

You have to think from the point of view of /the browser/, because it is the browser who will interpret this, relatively to where /it/ thinks it has got the original page from.

In other words, suppose that the user's browser originally gets this page from a link like :
http://somehost/myapp/somedir?somequery

Then, to obtain the above stylesheet, the browser is going to :
- strip the ? and whatever is after it (if anything)
- strip the last element of the path (somedir), leaving
http://somehost/myapp/
- add the relative reference (../../CSS/style1.css) to that, resulting in
http://somehost/myapp/../../CSS/style1.css

Now, does that point to the right place on the server ?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to