retirect Ognl 오류를 수정하는 방법, Param을 설정할 수 없습니까?

StackOverflow https://stackoverflow.com/questions/848828

  •  21-08-2019
  •  | 
  •  

문제

이것이 나인지 또는 이것이 버그인지 확실하지 않습니다.

다음 오류가 발생했습니다

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)

그리고 내 구성은 매우 적습니다

<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>

그리고 내 수업에는 한 쌍의 get/set 메소드가 있습니다. 그리고 그게 다야. 공상은 없습니다

나는 찾았다 이것 포럼에서 실. 그러나 그것은 내 문제를 해결하지 않습니다

나는 사용 중입니다

스트럿 2.1.16 스프링 2 스프링 보안 + CAS

(재미있는 동작은 오류 후 CAS 서버로 보내는 것입니다. 그러나 리디렉션 문제가 수정 된 후에는 수정 될 것 같습니다)

도움이 되었습니까?

해결책

Struts2가있는 버그처럼 보입니다. 그들은 ... 오류를 숨기는 것이 좋습니다.

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

에서....리디렉션에 대한 문제 해결 안내서 섹션

다른 팁

응용 프로그램을 7 서버로 배포 한 후이 문제에 직면했습니다. 기존 응용 프로그램이었고 코드 변경이 없었습니다.

서버 시작 로그에서 다음과 같은 예외를 발견했습니다

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

방금 서버 캐시를 지우고 다시 시작하면 문제가 해결되었습니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top