Google News
logo
Java Struts - Interview Questions
How action-mapping tag is used for request forwarding in Struts configuration file?
In Struts configuration file (struts-config.xml), forwarding options are defined under action-mapping tag.
 
In the following example, when a user will click on the hyperlink test.do, request will be forwarded to /pages/testing.jsp using following configurations from struts-config.xml file :
 
<action  path="/test" forward="/pages/testing.jsp">
 
This forwarding will take place when user will click on following hyperlink on the jsp page :
 
<html:link</strong> page="/test.do</strong>">Controller Example</html:link>
Advertisement