• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Requestdispatch forward

 
sudhakar kandasamy
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when I am using Requestdispatch().forward(),Requestdispatch().include() by using javawebserver2.0 in servlets to jsp,both these methods work simillarly.Both are dispatched control to jsp page and both methods include thes page and returns back to servlet.What is exact use of these pages.
 
John Bateman
Ranch Hand
Posts: 320
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
You may want to look up 'Design Patterns' and specifically check out the Model View Controller AND Request Dispatch Design Pattern. (This Months Java Pro has an article that talks about them a bit.. the E-Commerce article)
This method of programming (or architecture) is to allow you to break your code into components like a View (JSP) , Controller (Servlet) and Model (Database or Data Source).
It's the first step in building a really scalable system.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic