try this
<s:if test="${pageContext.request.contextPath}">
<link type="text/css" rel="stylesheet"
href="${pageContext.request.contextPath}/css/main.css">
<s:elseif test="${initParam.css}">
<link type="text/css" rel="stylesheet" href="${initParam.css}/css/main.css">
</s:elseif>
?
Martin Gainty
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business
of Sender. This transmission is of a confidential nature and Sender does not
endorse distribution to any party other than intended recipient. Sender does
not necessarily endorse content contained within this transmission.
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: Dynamic include of a CSS stylesheet
> Date: Wed, 3 Sep 2008 14:02:10 +0300
>
> >
> > I often use:
> >
> > <link type="text/css" rel="stylesheet" href="/css/main.css">
> > <link type="text/css" rel="stylesheet"
> > href="${pageContext.request.contextPath}/css/main.css">
> > <link type="text/css" rel="stylesheet" href="${initParam.css}/main.css">
> >
> > where ${initParam.css} refers to an init param in web.xml (useful if it
> > needs to change with the deployment, such as a version number)
> >
>
> Could you point me at some code examples on how to set this up. I've a need
> to
> load a different style sheet depending upon either the locale of the user, or
> a user selected locale.
>
> Regards
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
_________________________________________________________________
See how Windows connects the people, information, and fun that are part of your
life.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/