Meaningless Drivel is fun!*
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
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: 60057
    
  65

I'm confused about your terminology.

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How force refresh of page from object called by jsp/servlet?
 
Similar Threads
Help Needed -- how do I store and retrieve a session variable?
Logout page
Error Handling and the Response Object
Setting Refresh header not refreshing to specified URL
logout from page with frames