True but.... if the css file is used throughout the site, it's fetched
once using <link ... /> on the first page view. Every page view after
that will just check status, using the pre-cached one if it hasn't
changed on the server. Efficency comes when the resource is re-used for
all the pages using a single skin.
--David
Johnny Kewl wrote:
Yes...
What you can also do is include your styles, before it goes to the
browser, if say you have
styles for each page... ie not caching
eg:
<style>
<%@ include file="/style.just_styles" %>
</style>
now the browser will only do 1 trip to the server....
...... u c .... tomcat is very good ;)
----- Original Message ----- From: "David Smith" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Tuesday, April 17, 2007 10:23 PM
Subject: Re: Cascading style sheets and tomcat
Given that jsps are seen on the client as HTML files, yes -- all you
want. I would go further and say it's encouraged as the primary means
of decorating your pages.
Just do something like this in your jsp to make sure the css is
always found:
<link rel="stylesheet" type="text/css"
href="${pageContext.request.contextPath}/path/to/your.css" />
The example above is using the el expression language so be sure your
webapp's web.xml file is declared with the servlet spec version 2.4
schema.
--David
David Kerber wrote:
Can I use .css files with .jsp's, particularly when they are being
served up by Tomcat 5.5? Or do they only work with static html files?
TIA!
Dave
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [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]
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [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]