struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: stylesheets with jsp's under WEB-INF?
Date Fri, 15 Nov 2002 02:44:53 GMT

      We have no problems with our jsp files under web-inf and our style
sheets in the public area.

      Though I think you should be using the rewrite tag
<LINK rel="stylesheet" type="text/css" href="<html:rewrite page='/css/pageStyle.css'/>">

we do the same thing with javascript:
<SCRIPT src='<html:rewrite page='/js/general.js'/>'></SCRIPT>

it renders the path with the  app name:
<LINK rel="stylesheet" type="text/css" href="/ar/css/pageStyle.css">
<SCRIPT src='/ar/js/general.js'></SCRIPT>

hope this  helps.

Wendy Smoak <> on 11/14/2002 08:26:59 PM

Please respond to "Struts Users Mailing List"


Subject:    stylesheets with jsp's under WEB-INF?

I asked about this on, 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

The jsp lives in:
(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:

With all the style stuff directly in the jsp, it was working fine. But
I want to use this stylesheet with all of my jsp's, I'd like to store it
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

As well as putting style.css right beside contact.jsp and using

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:   <>
For additional commands, e-mail: <>

View raw message