Volker Krebs schrieb:
> Volker Krebs schrieb:
>> Hello,
>> we recently update from struts 2.0.14 to struts 2.1.6
>> In struts 2.0.14 org.apache.struts2.dispatcher.StrutsRequestWrapper
>> was delegating to the Value Stack.
>> This meant that in my JSP Page:
>> <s:property value="foo"/>
>> was the same as
>> ${foo}
>>
>> With struts 2.1.6 this doesn't seem to work.
>> How can I enable it ?
>>
> Hi,
> updates on this one!
> I debugged into
> org.apache.struts2.dispatcher.StrutsRequestWrapper.getAttribute(String)
>
> And the Action itself is not on the value Stack when the RequestWrapper
> is invoked. That's why access to the value stack with JSTL returns no
> Objects.
>
> I have to find the place where the Action itself is placed onto the
> value stack and see what has changed between 2.0.14 and 2.1.6.
> It must be assured, that the value stack contains the action itself when
> StrutsRequestWrapper is invoked.
>
> Any help still would be appreciated.
>
Hi,
problem solved! Just for the records:
If the struts2 filter config in web.xml looks as follows:
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
And the filter-mapping has dispatcher defined
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>ERROR</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
Accessing value stack with JSTL won't work in struts 2.1.6
If the filter-mapping is changed to:
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Everything works like in struts 2.0.14
Volker
---------------------------------------------------------------------
To unsubscribe, e-mail:
user-unsubscribe@...
For additional commands, e-mail:
user-help@...