Different between ForwardAction and ActionForward

ActionForward

ForwardAction

  1. Represents the result pages of struts Action class.

 

  1. Use forward tags in s-c.xml file to configure action forwards.
 1. A built-in Action class using which the resource of struts application can comm.. with each other through controller servlet called as ActionServlet.2. Use action tag in s-c.xml file to configure ForwardAction class as separate Action class.

Struts supplied <html: link> is alternate for the traditional <a> tag to prepare hyperlinks.

Example:-  <a href = “home.do”> tryagain </a>(or)

<html: link href = “home.do”> Tryagain </html: link>

<html: link action = “home.do”> Tryagain </html: link>

Here .do word is the extension word of ActionServlet url pattern (*.do)

Question: can we develop Struts application without form bean class (both manual & dynamic)?

Answer:    If Struts Action class is getting request from hyperlink of web page without data. Then form bean is not required.

  • If Struts Actoin class is getting request from form page and there is no need of perfering form validations, reset (-,-) method operations then the form bean can be mode as optional resource in the situation the execute method of StrutsAction class read the form data of form page through third parameter of execute () method i.e request object.

Leave a Reply

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