You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Plorks mail <pl...@hotmail.com> on 2006/05/11 11:35:18 UTC
CSS file problem
hi all
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
i've also tried putting it directly under the project name like this
webapps/projectname/style.css but it still gets ignored
can anyone tell me what i'm doing wrong
many thanks
_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free newsletters!
http://www.msn.co.uk/newsletters
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: CSS file problem
Posted by Daniel Dekany <dd...@freemail.hu>.
Thursday, May 11, 2006, 11:45:58 AM, Joe Desbonnet wrote:
> View the "source code" of your resulting web page. Use your mouse to
> select the href attribute of the link tag. And past into another
> browser window. See if it loads your CSS page. If you you need to
> adjust the content of your "stylesheet" context variable.
>
> Remember it's the *browser* that is going to be reading that file via
> a HTTP request. It needs to be accessible via whatever HTTP server
> (Tomcat?) you are using.
>
> Joe.
And the problem will be that the content of the WEB-INF directory is
hidden according to the Servlet Spec.
> On 5/11/06, Plorks mail <pl...@hotmail.com> wrote:
>>
>> hi all
>>
>> 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
>>
>> i've also tried putting it directly under the project name like this
>> webapps/projectname/style.css but it still gets ignored
>>
>> can anyone tell me what i'm doing wrong
>>
>> many thanks
>>
>> _________________________________________________________________
>> Be the first to hear what's new at MSN - sign up to our free newsletters!
>> http://www.msn.co.uk/newsletters
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
--
Best regards,
Daniel Dekany
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: CSS file problem
Posted by Joe Desbonnet <jd...@gmail.com>.
View the "source code" of your resulting web page. Use your mouse to
select the href attribute of the link tag. And past into another
browser window. See if it loads your CSS page. If you you need to
adjust the content of your "stylesheet" context variable.
Remember it's the *browser* that is going to be reading that file via
a HTTP request. It needs to be accessible via whatever HTTP server
(Tomcat?) you are using.
Joe.
On 5/11/06, Plorks mail <pl...@hotmail.com> wrote:
>
> hi all
>
> 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
>
> i've also tried putting it directly under the project name like this
> webapps/projectname/style.css but it still gets ignored
>
> can anyone tell me what i'm doing wrong
>
> many thanks
>
> _________________________________________________________________
> Be the first to hear what's new at MSN - sign up to our free newsletters!
> http://www.msn.co.uk/newsletters
>
>
> ---------------------------------------------------------------------
> 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
RE: CSS file problem
Posted by Steve O'Hara <so...@pivotal-solutions.co.uk>.
I have already answered this question for you - this is not a Velocity
problem so
please re-read my response and then read the Servlet API documentation
for more complete explanation.
Steve
-----Original Message-----
From:
velocity-user-return-17698-sohara=pivotal-solutions.co.uk@jakarta.apache
.org
[mailto:velocity-user-return-17698-sohara=pivotal-solutions.co.uk@jakart
a.apache.org] On Behalf Of Plorks mail
Sent: 11 May 2006 10:35
To: velocity-user@jakarta.apache.org
Subject: CSS file problem
hi all
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
i've also tried putting it directly under the project name like this
webapps/projectname/style.css but it still gets ignored
can anyone tell me what i'm doing wrong
many thanks
_________________________________________________________________
Be the first to hear what's new at MSN - sign up to our free
newsletters!
http://www.msn.co.uk/newsletters
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org