ContactUs

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

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:

[xml]

<action  path=”/test” forward=”/pages/testing.jsp”>

[/xml]

This forwarding will take place when user will click on following hyperlink on the jsp page:

[xml]

<html:link</strong> page=”/test.do</strong>”>Controller Example</html:link>

[/xml]

Related Posts Plugin for WordPress, Blogger...
Flag Counter