1024programmer Blog 9. The global-result configuration of result [global result set]_ covers _Jsoh’s blog

9. The global-result configuration of result [global result set]_ covers _Jsoh’s blog

class=”htmledit_views”>

global-result configuration-: The purpose is, for example, that other modules need to jump to the same error or the page does not need to be defined for each package.

struts.xml configuration:


<!DOCTYPE struts PUBLIC

“-//Apache Software Foundation//DTD Struts Configuration 2.3//EN” 


http://struts. apache.org/dtds/struts-2.3.dtd“>









<package name=
“package1” namespace=”/one” extends=”struts-default”>



/error.jsp //Global result set, errors returned by other actions will be accepted and processed to jump to error.jsp




/r1.jsp  

//when
When LoginAction processing returns an error, jump to /error.jsp 

 



<package name="
package2” namespace=”/two”
extends=”package1> //Inherit package1, also inherit
“struts-default”

//when
When LoginAction processing returns an error, jump to /error.jsp

/r1.jsp  

 



This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/9-the-global-result-configuration-of-result-global-result-set_-covers-_jsohs-blog/

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索