Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts-config.xml

 
Zoram Paul
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the following tag in struts-config.xml

<action path="/copyUrl"
type="examples.simple.CopyUrlAction"
name="CopyUrlBean"
scope="request"
input="/jsp/simple/urlPage.jsp"
cancellable="true"
validate="true">
<forward name="success" path="/jsp/simple/urlPage.jsp"/>
<forward name="failure" path="/jsp/simple/urlPage.jsp"/>
</action>


Can I replace
<forward name="success" path="/jsp/simple/urlPage.jsp"/>
<forward name="failure" path="/jsp/simple/urlPage.jsp"/>

with

<redirect name="success" path="/jsp/simple/urlPage.jsp"/>
<redirect name="failure" path="/jsp/simple/urlPage.jsp"/>

Can you tell me whats the difference between them?
When should I use and which one?




Please reply...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic