permaculture playing cards
The moose likes Servlets and the fly likes post-redirect-get-problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "post-redirect-get-problem" Watch "post-redirect-get-problem" New topic


Adewale Adebusoye
Ranch Hand

Joined: Sep 28, 2005
Posts: 118
i still have a problem with the Post Redirect Get model. i went through the article by micheal jouralev called "Redirect After Post", and i tried using redirect method from my login page.
So basically, the user logs in then hes taken to a results page by lieu of the sendRedirect() method. refreshing it stops the resending of the information.
The problem is that despite putting response headers in my doPOST, i can still click the foward button on my browser and access the results page. It refuses to expire.
I also included the <meta http-equiv> tags in my web pages, but it still caches it.
So please what can i do to solve this?

"Human beings can alter their lives by altering their state of mind" William James
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
You got to use sessions along with response headers

Check this thread

Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
Adewale Adebusoye
Ranch Hand

Joined: Sep 28, 2005
Posts: 118
Please i hate to sound like a novice, but how can i do that?
I agree. Here's the link:
subject: post-redirect-get-problem
It's not a secret anymore!