• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

About the Data which has been set up in Request Scope  RSS feed

 
Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Think of a scenario if i set soe data in request scope and if the user presses the back button will the data inside the request scope still exists ??

 
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I understand the situation you are trying to describe, no.

Request scope only covers a single request.

If the client abandons that request -OR- if the request completes and the response is sent, thats the end of it.

Bill

 
PavanPL KalyanK
Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

William Brogden wrote:
If the client abandons that request -OR- if the request completes and the response is sent, thats the end of it.



Is clicking the browser back button will fall under the specified list??

Becuase i think that (Clicking the back button) will be not considerded as a Request .

(I think data which is set in a request scope will be there even if he/she clicks a Back button of browser.

Any suggestions.
 
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

PavanPL KalyanK wrote:

Becuase i think that (Clicking the back button) will be not considerded as a Request .



Yes . [but if you prevent browser cache , the request get call on server side . i see this behaviour in tomcat]


PavanPL KalyanK wrote:

(I think data which is set in a request scope will be there even if he/she clicks a Back button of browser.



Here you confused with Browser Cache !
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But i have observed that clicking back button will make another request to server.
I am really confused .Can anybody clear this doubt with some meaning ful explanation?
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Surya Kant wrote:But i have observed that clicking back button will make another request to server.



Well, for that you need to prevent the browser Cache .otherwise it wont be happen
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The exact behavior on clicking the back button depends on many things - in addition to cache control, there may be JavaScripts on the page activated by the page being re-displayed and any number of other possibilities. You can't rely on all browsers behaving exactly the same way.

In any case, the first request is gone, long gone. It is up to you the programmer to correctly handle any data you want to keep.

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!