struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Luis Martinez Avial" <jlmarti...@pb-santander.com>
Subject HowRE: Struts2: httpheader result does not sent headers with hyphenated names
Date Wed, 12 Jan 2011 21:46:22 GMT
I launched an exception to get the stacktrace, and it calls OGNL:

java.lang.Throwable
        at
com.spb.mvc.controller.web.struts2.json.ResponseJSONResult.setMyValue(Re
sponseJSONResult.java:29)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:830)
        at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1253)
        at ognl.OgnlRuntime.setMethodValue(OgnlRuntime.java:1454)
        at
ognl.ObjectPropertyAccessor.setPossibleProperty(ObjectPropertyAccessor.j
ava:85)
        at
ognl.ObjectPropertyAccessor.setProperty(ObjectPropertyAccessor.java:162)
        at
com.opensymphony.xwork2.ognl.accessor.ObjectAccessor.setProperty(ObjectA
ccessor.java:28)
        at ognl.OgnlRuntime.setProperty(OgnlRuntime.java:2225)
        at ognl.ASTProperty.setValueBody(ASTProperty.java:127)
        at ognl.SimpleNode.evaluateSetValueBody(SimpleNode.java:220)
        at ognl.SimpleNode.setValue(SimpleNode.java:301)
        at ognl.Ognl.setValue(Ognl.java:737)
        at
com.opensymphony.xwork2.ognl.OgnlUtil.setValue(OgnlUtil.java:198)
        at
com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:
394)
        at
com.opensymphony.xwork2.ognl.OgnlUtil.setProperty(OgnlUtil.java:149)
        at
com.opensymphony.xwork2.ognl.OgnlReflectionProvider.setProperty(OgnlRefl
ectionProvider.java:91)
        at
com.opensymphony.xwork2.ObjectFactory.buildResult(ObjectFactory.java:221
)
        at
com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActi
onInvocation.java:209)
        at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultAct
ionInvocation.java:356)
        at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:266)
        at
com.spb.mvc.security.authoritation.web.AuthoritationInterceptor.intercep
t(AuthoritationInterceptor.java:100)
        at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:237)
        at
com.spb.mvc.controller.web.BusinessContextInterceptor.intercept(Business
ContextInterceptor.java:30)
        at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:237)
        at
com.spb.mvc.security.authentication.web.AuthenticationInterceptor.interc
ept(AuthenticationInterceptor.java:53)
        at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvo
cation.java:237)

 Any idea on how to avoid this behaviour?

-----Original Message-----
From: Dave Newton [mailto:davelnewton@gmail.com] 
Sent: Wednesday, January 12, 2011 12:30 PM
To: Struts Users Mailing List
Subject: Re: Struts2: httpheader result does not sent headers with
hyphenated names

I wonder if that's an OGNL thing.

Dave

On Wed, Jan 12, 2011 at 12:24 PM, JOSE L MARTINEZ-AVIAL
<jlmagc@gmail.com>wrote:

> Hi all,
>
>    I'm using Struts .2.1.8.1, and I've found a problem when I use  
> result type httpheader and I try to use a header name with a hyphen. 
> They don't get sent. For example, the following result definition:
>
> <result name="mvc.security.authentication.ntlm.solicited"
> type="httpheader">
>
>    <param name="status">401</param>
>
>    <param name="headers.WWW-Authenticate">NTLM</param>
>
>    <param name="headers.a">my header</param>
>
>    <param name="headers.WWWAuthenticate">NTLM</param>
>
> </result>
>
>    I receive the headers "a" and "WWWAuthenticate", but no the header 
> "WWW-Authenticate". Is there any way to fix this behaviour?
>
>
>
>    Thanks.
>
>
>
> Jose
>

Internet communications are not secure and therefore Banco 
Santander International does not accept legal responsibility for 
the contents of this message. Any views or opinions presented 
are 
solely those of the author and do not necessarily represent those 
of Banco Santander International unless otherwise specifically 
stated. 

Las comunicaciones via Internet no son seguras y por lo tanto 
Banco Santander International no asume responsabilidad legal 
ni 
de ningun otro tipo por el contenido de este mensaje. Cualquier 
opinion transmitida pertenece unicamente al autor y no 
necesariamente representa la opinion del Banco Santander 
International a no ser que este expresamente detallado.



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


Mime
View raw message