File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes What is the difference between page and request scope Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "What is the difference between page and request scope" Watch "What is the difference between page and request scope" New topic
Author

What is the difference between page and request scope

Rinku Sharma
Greenhorn

Joined: Mar 30, 2001
Posts: 18
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

Joined: Apr 20, 2000
Posts: 3252
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).]
 
 
subject: What is the difference between page and request scope