File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java Interview Guide
this week in the
Referring Script outside WEB-INF
Joined: Mar 01, 2005
Jul 13, 2006 01:16:00
below is my Project folder structure
i tried to use the stylesheet in a temp.jsp page inside
i referred the stylesheet as
<link href="../../stylesheets/layoutStyles.css" rel="stylesheet" type="text/css">
but it is not referred. the same case with the script file...
is there any problem in referring the source outside the WEB-INF.
Any pointers would appreciated...
Joined: Nov 24, 2005
Jul 13, 2006 01:37:00
I think that you should avoid relative paths,
and use absolute paths instead.
All roads lead to JavaRanch
Joined: Dec 11, 2004
Jul 13, 2006 04:58:00
Originally posted by Satou kurinosuke:
That won't work either.
The preceding slash tells the browser that this link is realative to the domain (the context path will be skipped).
Your best approach is to read the context path from the request object and then build your link; relative to that.
[ July 13, 2006: Message edited by: Ben Souther ]
How to ask a question...
Simple Servlet Examples
I agree. Here's the link:
subject: Referring Script outside WEB-INF
problem with webapp directory structure
Linkking css & js to jsp in struts
Calling JSP with in WEB-INF
CSS LInks issue
Do Not Understand "/tags/struts-logic" Not Found
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015