简体   繁体   中英

Struts2 prepare methods

I have one action class with different methods mapped for each action in my struts.xml. And I want different prepare methods invoked before my other methods mapped in the struts.xml.

Simply create a

void prepareMethodName(){}

Where MethodName is the name of your per-method Preparable method. The prepare() method by default will still run after this method is called.

Please see: http://struts.apache.org/2.0.14/docs/prepare-interceptor.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM