Difference between and tags?

Both forward and include are action tags, below are their differences

  • jsp:forward redirects the servlet Request and Servlet Response to another resource specified in the tag. The path of the resource is ‘relative path’. The output generated by current JSP will be discarded.
  • jsp:include processes the resource as part of the current jsp. It include the output generated by resource, which is specified in the Tag to the current JSP

In both the cases single Request process multiple resources.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.