• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What is the difference between page and request scope

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
 
reply
    Bookmark Topic Watch Topic
  • New Topic