Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

about session  RSS feed

 
ravindra patil
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
after submitting my question on IO forum i went to take tea
when i came i click Back button so browser showes session expired and as usual display either retry or cancel when i click retry my last topic is added again it happened each time when session got expired so why this is happening
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have JavaRanch forum to dicuss this kind of issues.
 
yuvraj singh raghuvanshi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello ravindra,
i can help you a little bit.If you are having a slight knowledge about SERVLETS you will be able to understand what i'm trying to convey.
Whenever we login to A Web Container(a web server supporting servlet) through our web browser,a HttpSession type session object is created by the web container for our browser.It set a maximum time for that browser.for ex- if time set by the server is 20 min and you keep your browser idle(inactive) for >20 min,your session will expire.hence when you will tend to click any link on browser,it will flash a message like "YOUR SESSION HAS BEEN EXPIRED PLEASE RELOGIN" and you have to relogin on that server.
The reason for this is that if there are a large amount of webbrowsers accessing the server,the server has to create a large amount of session objects and if it is not deleting the objects which are inactive,its memory will be wasted and it wouldnt be able to allow other browsers to login.
I hope i have given a satisfactory answer.If anyone feel that i am wrong somewhere please let me know.
its yuvi bhai,
signing off
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chetan Parekh:
We have JavaRanch forum to dicuss this kind of issues.


Moved.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ravindra patil:
after submitting my question on IO forum i went to take tea
when i came i click Back button so browser showes session expired and as usual display either retry or cancel when i click retry my last topic is added again it happened each time when session got expired so why this is happening


JavaRanch cookies don't time out. I don't think the dialog you're seeing has anything to do with timeouts; it's possibly the "Resend POST data?" dialog. The dialog is asking you whether you want to submit the form data again. When you press "Retry" (which most likely actually says "OK", unless you're using an unusual browser) then the POST gets submitted again -- and so your post gets submitted again. The whole point of that dialog is to warn you that thing like this can happen.

Or perhaps it is a "time out" dialog, but you're in some sort of Internet cafe or something which times out your session. This has nothing to do with the Ranch.

In any case, instead of pressing "back," click on one of the links near the top of the page -- there'll be one to go back to the forum, and one to go back to the Saloon.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!