How to fix OGNL redirect error, Failed to set parameter?

I'm not sure if it's me, or if it's a mistake.

I got the following error:

11:52:01,623 ERROR ObjectFactory:27 - Unable to set parameter [dest] in result of type [org.apache.struts2.dispatcher.ServletRedirectResult]
Caught OgnlException while setting property 'dest' on type 'org.apache.struts2.dispatcher.ServletRedirectResult'. - Class: ognl.ObjectPropertyAccessor
File: ObjectPropertyAccessor.java
Method: setProperty
Line: 132 - ognl/ObjectPropertyAccessor.java:132:-1
        at com.opensymphony.xwork2.ognl.OgnlUtil.internalSetProperty(OgnlUtil.java:392)

And my configuration is pretty minimal

<package name="esupport" namespace="/esupport" extends="struts-default">
        <action name="old-esupport" class="com.my.MyRedirectAction">
            <result type="redirect">
            <param name="location">http://some.server.com/init.asp</param>
            <param name="dest">${dest}</param>
            </result>
        </action>
    </package>

And my class has a couple of get / set methods. And so it is. Nothing unusual

I found this thread in the forum. But that does not solve my problem.

I use

Struts 2.1.16 Spring 2 Spring Security + CAS

(Funny behavior: it sends me to the CAS server after the error, but I think it will be fixed after the redirection problem is fixed)

+3
source share
2 answers

this seems like a bug with struts2. they recommend ... hide the error:

<category name="com.opensymphony.xwork2.ObjectFactory">
   <priority value="fatal"/>
</category>

from....

+3

WAS 7. , .

Failed to write out object: ext___405722372
com.ibm.wkplc.extensionregistry.util.XmlUtilException: Unable to write to the given file

, .

0

Source: https://habr.com/ru/post/1708096/


All Articles