struts를 2.5.2로 업그레이드하면 발생하는 문제 및 해결 방안(추천)

1635 단어 struts2.5
원래 버전은 2, 3.x, 보안 이유로 2.5.2로 업그레이드해야 합니다.
1, 2.5.2 버전은 더 이상 xwork를 제공하지 않습니다.jar,struts-core 패키지에 통합되었습니다.
2, 접근할 수 없는 방법은 모든 action 프로필에 strict-method-invocation="false"를 추가해야 합니다.

<package name="login" namespace="/login" extends="struts-default" strict-method-invocation="false">
2.5 버전의 구성 파일 헤더를 수정합니다.

<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
3. 세션이 효력을 잃는 문제는 웹logic 서버에 대해session-descriptor 노드를 추가합니다.

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/90">
<context-root>/ynwjnw</context-root>
<container-descriptor>
<servlet-reload-check-secs>-1</servlet-reload-check-secs>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
<session-descriptor>
<cookie-name>JSESSIONID1</cookie-name>
</session-descriptor>
</weblogic-web-app>
4, 2.5.2 버전 jdk 요구 1.75, 웹.xml 가운데

org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
수정:

org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter
위에서 말한 것은 편집자가 여러분께 소개한struts를 2.5.2로 업그레이드하여 직면한 문제 및 해결 방안(추천)으로 여러분께 도움이 되었으면 합니다. 만약에 궁금한 점이 있으면 저에게 메시지를 남겨 주시면 편집자는 제때에 답장을 드리겠습니다.여기에서도 저희 사이트에 대한 지지에 감사드립니다!

좋은 웹페이지 즐겨찾기