struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wes Wannemacher <w...@wantii.com>
Subject Re: Accessing http header with ognl
Date Tue, 01 Sep 2009 13:17:28 GMT
Try <s:property value="%{#request.header.referer}" />

http://struts.apache.org/2.x/docs/ognl.html

For non-root objects, you have to use the '#' symbol.

-Wes

On Tue, Sep 1, 2009 at 5:53 AM, Volker Krebs<volker.krebs@abas.de> wrote:
> Hello,
>
> accessing the http header with JSTL is quite easy:
> ${header}
>
> but how can I do it using OGNL ?
>
> <s:property value="%{request.header.referer}" />
> <s:property value="%{header.referer}" />
> Nothing is working.
>
> The Problem is that request.getHeader() is never pushed onto the value
> stack. How can I enable it ?
>
> thanks
> Volker
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message