This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes jsp:forward vs logic:forward Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "jsp:forward vs logic:forward" Watch "jsp:forward vs logic:forward" New topic

jsp:forward vs logic:forward

Marco Vanoli
Ranch Hand

Joined: Jan 12, 2005
Posts: 99
Waht is the difference between to use
<jsp:forward page=""/>
( is an action forward than point to my.jsp )


<logic:forward name="welcome"/>

(welcome is a global forward that point to action

Wich is the right tag to use ?

bye, <br />Marco
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Here are the reference urls:

It looks like the main difference is that logic:forward will perform a redirect if you've already written to the output buffer and it's too late to forward.

In my opinion, though, I can't think of a good reason to do a forward from a JSP. The Action class should do the forwarding.

Consultant, Sima Solutions
sweety Ktv

Joined: Jan 11, 2012
Posts: 1
jsp:forward does not check for the path in struts-config.xml, it directly forwarded to the page

logic:forward checks for the name in <global-forwards> of struts-config.xml
Consider Paul's rocket mass heater.
subject: jsp:forward vs logic:forward
Similar Threads
Pop up new HTML page in JSP
Beginner: Action Forward & Global Forward
Newbie to with ActionForward error
getting the struts-config.xml reference in JSP