- Q Explain the musical chapters of Natyasastra
- Q What are the characteristics of negative feedback?
- Q In what US city do they watch the most TV evangelists per cap
- Q In Hunchback of Notre Dame, Tony Jay supplied the voice of Judge Frollo. What was another character he supplied a voice for in a different full length feature animation?
- Q How a large number of ip addresses are wasted using ipv4 address classes?
- Q Preparing to invade Japan in WW2 the US ordered 400000 what
- Q can we have static initializer blocks in EJB?
- Q How do you control cylinder liner wear?
- Q Describe the most difficult patient you've had to test and outfit with a hearing device. How did you handle the situation?
- Q Mention the family, order of Chub Fish?
- Q What is extensible stylesheet language (xsl)?
Question
Explain the difference between ForwardAction and IncludeAction
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
Answers
Forwarding to a specified URL is provided by the ForwardAction. The mechanism to include the specified URL contents is proveided by the IncludeAction.
ForwardAction is used to forward to a control from one page to another page / action. IncludeAction is used to include an action in another action.
ForwardAction is similar to < jsp:forward > and include action is similar to < jsp:include > tags of a JSP page.
ForwardAction IncludeAction
Forwards to the context-relative URI specified by the parameter property of the associated ActionMapping. Includes the context-relative URI specified by the parameter property of the associated ActionMapping.
An entry can be created as:
< action
path="/saveSubscription"
type="org.apache. struts.actions.ForwardAction"
name="subscriptionForm"
scope="request"
input="/subscription.jsp"
parameter="/path to processing servlet" />
To configure its use in the struts-config.xml file An entry can be created as:
< action
path="/saveSubscription"
type="org. apache. struts. actions.IncludeAction"
name="subscriptionForm"
scope="request"
input="/subscription.jsp"
parameter="/path to processing servlet" >
To configure its use in the struts-config.xml file
Steps to use ForwardAction:
Using the html:link tag with the action attribute, add a link to the JSP page that points to the action.
Create an Action Mapping in the Struts configuration file that uses the ForwardAction with the parameter attribute to specify the JSP path. Use the IncludeAction only if the action is going to be included by another action or JSP. Therefore, if we have code in our JSP that looks like this:
< jsp:include page="/someWebApp/ someModule/someAction.do " />
(a ForwardAction cannot be used here because it would forward control to the new action rather than including its output within the output of the JSP-or throw a nasty IllegalStateException if the output buffer was already committed.) Your Comment
ForwardAction is used to forward to a control from one page to another page / action. IncludeAction is used to include an action in another action.
ForwardAction is similar to < jsp:forward > and include action is similar to < jsp:include > tags of a JSP page.
ForwardAction IncludeAction
Forwards to the context-relative URI specified by the parameter property of the associated ActionMapping. Includes the context-relative URI specified by the parameter property of the associated ActionMapping.
An entry can be created as:
< action
path="/saveSubscription"
type="org.apache. struts.actions.ForwardAction"
name="subscriptionForm"
scope="request"
input="/subscription.jsp"
parameter="/path to processing servlet" />
To configure its use in the struts-config.xml file An entry can be created as:
< action
path="/saveSubscription"
type="org. apache. struts. actions.IncludeAction"
name="subscriptionForm"
scope="request"
input="/subscription.jsp"
parameter="/path to processing servlet" >
To configure its use in the struts-config.xml file
Steps to use ForwardAction:
Using the html:link tag with the action attribute, add a link to the JSP page that points to the action.
Create an Action Mapping in the Struts configuration file that uses the ForwardAction with the parameter attribute to specify the JSP path. Use the IncludeAction only if the action is going to be included by another action or JSP. Therefore, if we have code in our JSP that looks like this:
< jsp:include page="/someWebApp/ someModule/someAction.do " />
(a ForwardAction cannot be used here because it would forward control to the new action rather than including its output within the output of the JSP-or throw a nasty IllegalStateException if the output buffer was already committed.) Your Comment
- 0
- 0
- New Answer
- Contributors: *,
More Software,Java Questions..
What is the inputsplit in map reduce software?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Can variables be used in Java without initialization?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Java,
What is the difference between java bean and enterprise java bean?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Java,
What is software configuration management?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
How does the java database connectivity (jdbc) work?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Java,
What are the advantages of threads in java?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 0 )
- Tags: Java,
What Is Java Api For Xml-based Rpc (jax-rpc)?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
How can you implement fine-grained auditing?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is IBM’s simple explanation for Big Data’s four critical features?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is static synchronized method in JDBC API? Give an example?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
What does the NULLIF function do?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What happens if a start method is not invoked and the run method is directly invoked?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Should we override finalize method
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
what is the difference between mysql_fetch_array and mysql_fetch_object?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
How will XML affect my document links?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What is object cloning in Java?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 0 )
- Tags: Java,
Why to use Style Sheets?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
What are Filters in MVC?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
Can you explain Application layer in OSI model?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,
How to define new testplan attributes?
- 0
- 0 |
- |
- Post Answer |
- Answers ( 1 )
- Tags: Software,