You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Veronica Iturrioz <vi...@yahoo.com> on 2007/05/04 13:24:48 UTC
HTTPHeader result
Hi,
Had anyone work with <result type="httpheader">?
How
does the params "headers" work?
I try different options but it seems to not
produce any change
<param name="headers.a
">xxx</param>
Thanks
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: HTTPHeader result
Posted by Laurie Harper <la...@holoweb.net>.
Veronica Iturrioz wrote:
> Hi,
> Had anyone work with <result type="httpheader">?
> How
> does the params "headers" work?
> I try different options but it seems to not
> produce any change
>
> <param name="headers.a
> ">xxx</param>
What did you try, and what were the results? Note the documentation for
the 'parse' parameter [1], which says "parse - true by default. If set
to false, the headers param will not be parsed for Ognl expressions." In
your example above, you don't set the 'parse' parameter to false, so
Struts is going to try and evaluate 'xxx' as an OGNL expression.
One of these ought to work (untested):
<param name="parse">false</param>
<param name="x.my.header.1">xxx</header>
or
<param name="x.my.header.1">'xxx'</header>
The example in the documentation could probably be improved to make this
a little more clear up front...
L.
[1] http://struts.apache.org/2.x/docs/httpheader-result.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org