Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

is there any Difference ?  RSS feed

 
faisal usmani
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

i am not sure whether i will make sense or not , but i am just curious to know is there any difference between <jsp:forward> action tag and forward method of RequestDispatcher in Servlet's .

I mean both forwards the request , and if i am not not mistaken they pass values through browser header , correct me if i wrong.


Is there any difference


regards
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They result in the same call being made.
The tag is shorthand.

Whenever you're in doubt about something like this, take a look at the generated servlet code. You'll have to look at your container's documentation to see where it is (some containers don't save these source files without additional configuration).

In Tomcat these files are under {tomcat home}/work/...
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!