You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de> on 2006/10/11 14:16:07 UTC
EL expression question - how to get them evaluated?
Using jsp for the views, i want to prefix some path, for example this:
<link rel="stylesheet" href="<h:outputText
value="#{facesContext.externalContext.requestContextPath}"/>/html/style/mystyle.css" />
The bad about that is, that i have to take a component, where an el
expression should be enough, shouldnt it?
Is it possible to habe:
<link rel="stylesheet"
href="#{facesContext.externalContext.requestContextPath}/html/style/mystyle.css" />
Or is this not possible?
kind regards
PS: Using facelets i can use what i want - but using jsp its not
evaluated? Some hints?
Re: EL expression question - how to get them evaluated?
Posted by Volker Weber <we...@googlemail.com>.
Hi Torsten,
you can't use jsf el expression outside jsf tag attributes!
<link ...> is not an jsf tag.
but this shoud work inside jsp:
<link rel="stylesheet"
href="<%= request.getContextPath() + "/html/style/mystyle.css"%>" />
regards,
Volker
2006/10/11, Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>:
> http://mail-archives.apache.org/mod_mbox/myfaces-users/200511.mbox/%
> 3C4375C479.3080103@weber-oldenburg.de%3E
>
> Maybe a solution - but wrapping a simple thing in a bean - much
> overhead :-|
>
> Am Mittwoch, den 11.10.2006, 14:16 +0200 schrieb Torsten Krah:
> > Using jsp for the views, i want to prefix some path, for example this:
> >
> > <link rel="stylesheet" href="<h:outputText
> > value="#{facesContext.externalContext.requestContextPath}"/>/html/style/mystyle.css" />
> >
> > The bad about that is, that i have to take a component, where an el
> > expression should be enough, shouldnt it?
> >
> > Is it possible to habe:
> >
> > <link rel="stylesheet"
> > href="#{facesContext.externalContext.requestContextPath}/html/style/mystyle.css" />
> >
> > Or is this not possible?
> >
> > kind regards
> >
> >
> > PS: Using facelets i can use what i want - but using jsp its not
> > evaluated? Some hints?
> >
>
>
Re: EL expression question - how to get them evaluated?
Posted by Torsten Krah <tk...@fachschaft.imn.htwk-leipzig.de>.
http://mail-archives.apache.org/mod_mbox/myfaces-users/200511.mbox/%
3C4375C479.3080103@weber-oldenburg.de%3E
Maybe a solution - but wrapping a simple thing in a bean - much
overhead :-|
Am Mittwoch, den 11.10.2006, 14:16 +0200 schrieb Torsten Krah:
> Using jsp for the views, i want to prefix some path, for example this:
>
> <link rel="stylesheet" href="<h:outputText
> value="#{facesContext.externalContext.requestContextPath}"/>/html/style/mystyle.css" />
>
> The bad about that is, that i have to take a component, where an el
> expression should be enough, shouldnt it?
>
> Is it possible to habe:
>
> <link rel="stylesheet"
> href="#{facesContext.externalContext.requestContextPath}/html/style/mystyle.css" />
>
> Or is this not possible?
>
> kind regards
>
>
> PS: Using facelets i can use what i want - but using jsp its not
> evaluated? Some hints?
>