File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Groovy and the fly likes setting response headers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Groovy
Bookmark "setting response headers" Watch "setting response headers" New topic
Author

setting response headers

charu shila
Greenhorn

Joined: Nov 24, 2001
Posts: 11
Hi All,
I am working with Grails 1.1.I have a userLogin action which validates a username and password and forwards to the view.In the view I am displaying a message like "Welcome ......$(username)" which is displaying the correct username.But when I press Ctrl+N keys and open another browser window(firefox) it still displays the same message.I am trying to display the default page and not the one where the user has already logged in.I have also tried setting the following response headers

response.Pragma='no-cache'
response.Cache-Control='no-cache'
response.Expires='-1'

in the userLoging action but for some reason the browser doesn't seem to clear the cache.Could somebody please guide me in the right direction.

Regards
bond
charu shila
Greenhorn

Joined: Nov 24, 2001
Posts: 11
Hi All
Could somebody please help me with this?

regards
Peter Ledbrook
author
Greenhorn

Joined: Jul 15, 2009
Posts: 25
I suspect your problem is due to the session. Once a browser has a session cookie, it will always send that cookie to the server. You either have to log out or open a different browser (such as Opera). I gather that there are ways to get round this, but I don't know what they are.

Cheers,

Peter
Vyas Sanzgiri
Ranch Hand

Joined: Jun 16, 2007
Posts: 686

Happens for me too if you are using Single Sign on. I believe that is a feature!


===Vyas Sanzgiri===
My Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: setting response headers
 
Similar Threads
Help with File download
Back button problem on logout
WL 10 Browser caching issue
Set Reponse Headers Problem
Struts 1.1 question (Might not be an easy one)