• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

request dispatcher

 
sitaram irrinki
Ranch Hand
Posts: 158
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using requestdispatcher.include(request,response) we can include the
content generated by another servlet/html in the response.
The included servlet makes use of this request/response object pair.

But what is the use of this request/response pair if we are including an Html page(may be we generally don't include an Html page from a servlet but in case if we do so).
Is this just the syntax that we have to follow or is there any reason for this.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to our Servlets forum...
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you include an HTML page, what you're really doing is forwarding or including the defaultServlet (or whatever it is, in your container, that serves up static content). That servlet has the same access to the request and response as any other.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic