简体   繁体   中英

What happens when in struts configuration “xyz.do” is in forward path?

This is a sample code from config file.

<action path="/admin/reloadLogging" 
           type="com.sap.isa.core.logging.ReloadLoggingAction">
     <forward name="success" path="/b2b/init.do"/>
</action>

I did not find any specific configuration for /b2b/init.do .

So my question is, where the request will be forwarded??

There is no JSP for it. Will it go again to the Action class?

This request will be forwarded to the action class/servlet that handles the "b2b/init.do" request.

For example if you forwarded to the same url "reloadLogging" then you will find yourself in an infinite loop and get a " StackOverflow " error.

<action path="/admin/reloadLogging" 
           type="com.sap.isa.core.logging.ReloadLoggingAction">
     <forward name="success" path="/admin/reloadLogging.do"/>
</action>

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