aspose file tools
The moose likes Servlets and the fly likes How force refresh of page from object called by jsp/servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "How force refresh of page from object called by jsp/servlet?" Watch "How force refresh of page from object called by jsp/servlet?" New topic
Author

How force refresh of page from object called by jsp/servlet?

Dan Bizman
Ranch Hand

Joined: Feb 25, 2003
Posts: 387
How (and what's the best way to) do I force a refresh of a page/the browser from inside an object that's called? Can I do it if the object only has a Session object? or does it need the response object (to set headers)? Is there another waay to do it?

Here's what i have:

JSP reads a parameter "logout" and pulls an object from the Session "LoginHandler". It then calls "logout()" on it.

Now what I'd prefer is that the JSP only call logout() and the page kicks them out to a login page. But I'm guessing I'd have to either find a way to pass the response object to the LoginHandler or have the JSP set the refresh header (or change the date) itself. Is there a way I'm missing?
[ October 25, 2006: Message edited by: Dan Bizman ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56213
    
  13

I'm confused about your terminology.

When you say "refresh" are you really meaning "redirect"?


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How force refresh of page from object called by jsp/servlet?
 
Similar Threads
logout from page with frames
Setting Refresh header not refreshing to specified URL
Logout page
Error Handling and the Response Object
Help Needed -- how do I store and retrieve a session variable?