Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Diff between IncludeAction & ForwardAction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Diff between IncludeAction & ForwardAction" Watch "Diff between IncludeAction & ForwardAction" New topic

Diff between IncludeAction & ForwardAction

Vinodkumar Beli

Joined: Nov 26, 2008
Posts: 4
IncludeAction: include the specified URL into current JSP page,It is
just similar to <jsp:include page ="resource"> , & you can include one more no of resource into the current Jsp page.
2.All jsp include are contributed in dispaying view.
3. RequestDispatcher rd = request.getRequestDispatcher("path of jsp ");
rd.include(request , response);
internally it does this fuction

ForwardAction : 1.It is mechanism of forwarding the request to specified URL resources (i.e jsp page)
ex : 2.two.jsp page is included into one.jsp only two.jsp page contenet are contributed in dispaying a view.
3. RequestDispatcher rd = request.getRequestDispatcher("path of jsp ");
rd.forward(request , response);
internally it does this fuction

if you need example , than i will send for you my friend.

By Vinodkumar Beli from Gulbarga


happy to help!!!
I agree. Here's the link:
subject: Diff between IncludeAction & ForwardAction
Similar Threads
difference between request.getRequestDispatcher(),response.sendRedirect()
passing parameter from jsp to servlet
sebRedirect() can ask for the resource outside of current webapp??
Using RequestDispatcher, NullPointerException
difference between pageContext.include and jsp:include