เวอร์ชันดั้งเดิมคือ 2.3.x และจะต้องอัพเกรดเป็น 2.5.2 เนื่องจากเหตุผลด้านความปลอดภัย
1. เวอร์ชัน 2.5.2 ไม่ได้ให้ Xwork.jar อีกต่อไปและรวมเข้ากับแพ็คเกจ struts-core อีกต่อไป
2. ปัญหาของวิธีการที่ไม่สามารถเข้าถึงได้จำเป็นต้องเพิ่มวิธีการอย่างเข้มงวด-วิธีการ-invocation = "false" ในแต่ละไฟล์การกำหนดค่าการกระทำ:
<package name = "ล็อกอิน" namespace = "/login" ขยาย = "structs-default" strict-method-invocation = "false">>
และแก้ไขส่วนหัวไฟล์กำหนดค่าเป็นเวอร์ชัน 2.5:
<! doctype struts สาธารณะ "-// Apache Software Foundation // dtd struts การกำหนดค่า 2.5 // en" "http://struts.apache.org/dtds/struts-2.5.dtd">
3. ปัญหาของความล้มเหลวของเซสชันเพิ่มโหนดเซสชัน Descriptor สำหรับเซิร์ฟเวอร์ WebLogic:
<? xml version = "1.0" encoding = "utf-8"?> <weblogic-web-app xmlns = "http://www.bea.com/ns/weblogic/90"> <stronte-root>/ynwjnw </context-root> <containter-descriptor> <servlet-roload-check-secs> web-inf-classes> true </foret-web-inf-classes> </container-descriptor> <session-descriptor> <Cookie-Name> jsessionId1 </cookie-name> </ession-descriptor>
4. เวอร์ชัน 2.5.2 JDK ต้องการ 1.7 5, web.xml
org.apache.struts2.dispatcher.ng.filter.strutsprepeprepareandexecutefilter
แก้ไขเป็น:
org.apache.struts2.dispatcher.filter.strutsprepeprepareandexecutefilter
ข้างต้นคือปัญหาและการแก้ปัญหาที่พบเมื่ออัพเกรด struts เป็น 2.5.2 ที่บรรณาธิการแนะนำให้คุณ (แนะนำ) ฉันหวังว่ามันจะเป็นประโยชน์กับคุณ หากคุณมีคำถามใด ๆ โปรดฝากข้อความถึงฉันและบรรณาธิการจะตอบกลับคุณทันเวลา ขอบคุณมากสำหรับการสนับสนุนเว็บไซต์ Wulin.com!