struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Pratt" <thechrispr...@gmail.com>
Subject Re: Dynamic include of a CSS stylesheet
Date Thu, 04 Sep 2008 03:53:18 GMT
I'm pretty sure that wouldn't work without modifying the Struts TLD file
since you can't use JSTL EL in <s: tags.  (*Chris*)

On Wed, Sep 3, 2008 at 5:51 AM, Martin Gainty <mgainty@hotmail.com> wrote:

>
> 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: roger.varley@googlemail.com
> > To: user@struts.apache.org
> > 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: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
>
> _________________________________________________________________
> See how Windows connects the people, information, and fun that are part of
> your life.
> http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message