aspose file tools*
The moose likes Servlets and the fly likes Session refresh Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session refresh" Watch "Session refresh" New topic
Author

Session refresh

Ashok Nettem
Greenhorn

Joined: Nov 04, 2007
Posts: 10
i got a problem can any one help me.I am using Session to store the information.i am using the META TAG to refresh and the session is also getting refreshed can any one help me how to retain the information the information of the session

Thanks in advance

[Topic fixed by Dave. Please don't shout]
[ February 08, 2008: Message edited by: David O'Meara ]
suri jagadish
Greenhorn

Joined: Sep 14, 2005
Posts: 19
what do you mean by session refresh. when you refresh the page it submits to the same session but the same information is sent to the server. The solution to this is the page that you are trying to display should be displayed using the response.sendRedirect() instead of request.getRequestDispacther().forward() so that when there is a refresh it will only ask for that page without submitting any data.

Hope iam clear. if you can provide me with how you are navigating then i will be able to explain in more detail.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

A browser refresh will have no effect on the session unless it triggers some of your code that invalidates the session. Do you have any such code?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Scott Duncan
Ranch Hand

Joined: Nov 01, 2002
Posts: 363
response.sendRedirect() instead of request.getRequestDispacther().forward()


Umm, I am not really clear how either one of these calls effect the session. Please explain.


No more rhymes! I mean it!<br /> <br />Does anybody want a peanut?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

Originally posted by Scott Duncan:
Umm, I am not really clear how either one of these calls effect the session. Please explain.

They don't.

The OP may be confused regarding the difference between request and session scopes.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Session refresh
 
Similar Threads
SEESION REFRESH
Setting Refresh header not refreshing to specified URL
pagination when page refresh
Problems with sessionID persistence...
which one is better to use?