The way to think about this is that the style sheets are loaded by the
client, not by the server. When you do the reference, make sure the
client can load the file. The link tag is just passed through to the
browser.
my root is
/<project>/htdocs - visible to the client
My jsp's are in
/<project>/htdocs/WEB-INF/jsp - invisible to the client
My styles are in
/<project>/htdocs/styles - visible to the client
My style reference is
<link rel="StyleSheet" type="text/css" href="styles/<sheet>.css" />
Hope that helps
Edgar
-----Original Message-----
From: Wendy Smoak [mailto:Wendy.Smoak@;asu.edu]
Sent: Thursday, November 14, 2002 9:27 PM
To: '[EMAIL PROTECTED]'
Subject: stylesheets with jsp's under WEB-INF?
I asked about this on comp.lang.java.programmer, and the response was,
basically, "Don't do that." So, since Struts is the reason I'm putting
my jsp's under WEB-INF, can anyone here help with this dilemma?
Would it be better to move the jsp's back above WEB-INF and put in a
Filter to stop people accessing them directly? (Not quite sure _how_
yet but if that's the answer I'll figure it out!)
[Tomcat 4.1.14, Struts 1.1 nightly]
I can't get my jsp's that are stored under WEB-INF/jsp to "see" my
stylesheet.
The jsp lives in: /path/to/tomcat/webapps/dev/WEB-INF/jsp/contact.jsp
(They are under WEB-INF to keep people from getting to them without
going through the Struts action controller.)
I don't really need to hide my stylesheet, so it can live in:
/path/to/tomcat/webapps/dev/css/style.css
With all the style stuff directly in the jsp, it was working fine. But
since I want to use this stylesheet with all of my jsp's, I'd like to
store it separately. I've tried both: <LINK REL="stylesheet"
TYPE="text/css" HREF="css/style.css" TITLE="Style" /> <LINK
REL="stylesheet" TYPE="text/css" HREF="/css/style.css" TITLE="Style"/>
As well as putting style.css right beside contact.jsp and using
HREF="style.css"
I'm sure I just haven't hit on the right combination of where to put it
and what LINK tag to use. Can someone enlighten me?
Thanks in advance,
--
Wendy in Chander, AZ
--
To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>