Hello Nick,

Maybe, the <html:base/> tag could help you. It creates the 
<base href="..."> tag on your page.

Marcel


-----Original Message-----
From: Afshartous, Nick [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 09, 2002 3:43 PM
To: Struts Users Mailing List
Subject: CSS stylesheet containing relative image references


Hi,

My JSPs use some stylesheeets that contain relative references to 
images like

                /* left page button */
                TD.pgbut2 {
                /* background-color : #cccccc; */
                background-image : url(../images/can_but_center.gif);
                }
 

The relative references work fine if a JSP is hit directly. 
However, if an action forwards to a JSP then the web
server tries to resolve the reference using the default
servlet context, as opposed to the servlet context
of the web application.  

The only solution I can think of is to generate the CSS files
with absolute references.  Was wondering though if anyone has
another solution or if Struts has something to help deal with 
this issue ?  Thanks for any pointers.

  Nick

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to