Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What is the difference between page and request scope

 
Rinku Sharma
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,
What is the difference between Page and Request scope and when should each of these be used in a JSP page.How does request scope work between JSP pages.
Bye,
Amit
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rinku Sharma:
What is the difference between Page and Request scope

There is a difference only if you use <jsp:forward> (or <jsp:include> ). Page scoped beans do not survive the forward, request scoped beans do. Forwarding basically means that the request is passed on to a different JSP or servlet and it is up to that servlet to generate the response. Because the new JSP is still handling the same request, it has access to all request-scoped beans.
- Peter

[This message has been edited by Peter den Haan (edited June 07, 2001).]
 
If you are using a rototiller, you are doing it wrong. Even on this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!