velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve O'Hara" <soh...@pivotal-solutions.co.uk>
Subject RE: CSS file problem
Date Fri, 12 May 2006 15:43:33 GMT
Off base I'm afraid.
The WEB-INF folder is used for running your servlet - everything within
it is hidden to the user.  Only the servlet has access to this folder.
Any non-servlet links like href=style.css are referenced to the current
document base.  If it is like href=/style.css then it is referenced to
the servlet base (the folder containing the WEB-INF folder).

Steve



-----Original Message-----
From:
velocity-user-return-17703-sohara=pivotal-solutions.co.uk@jakarta.apache
.org
[mailto:velocity-user-return-17703-sohara=pivotal-solutions.co.uk@jakart
a.apache.org] On Behalf Of Withers John Z
Sent: 11 May 2006 14:55
To: Velocity Users List; charlieh@alloy.com
Subject: RE: CSS file problem

Hmmm.  Its been a while since dealt with this type of problem.  However,
when you used an application server, as the writer appears to be doing,
isn't the WEB-INF the directory used to server files for the
application?  In that case, just using href=style.css would be adequate.
Am I off-base?

John Withers

-----Original Message-----
From: Charles Harvey III [mailto:charlieh@alloy.com] 
Sent: Thursday, May 11, 2006 8:46 AM
To: Velocity Users List
Subject: Re: CSS file problem



Townson, Chris said the following on 5/11/2006 6:05 AM:
>> i'm trying to include a css file but it's being ignored
>>
>> i have this in my vm template
>>
>> <html>
>> <head>
>>   	<link rel="stylesheet" type="text/css" href="$stylesheet"/>
>> </head>
>> ........
>>
>> where $stylesheet = webapps/projectname/WEB-INF/style.css
>>     
>
>
> a browser would not be able to retrieve a CSS file from WEB-INF
>
> try putting the CSS in the doc root or similar
>
> C
>
>   
Also, don't use "webapps/projectname/".  Use either "/projectname/"
or "projectname/".


Charlie


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message