This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Struts and the fly likes Page doesn't reload after redirect in IE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Page doesn Watch "Page doesn New topic

Page doesn't reload after redirect in IE

Leticia Barbalho
Ranch Hand

Joined: Sep 02, 2005
Posts: 37
Hello everyone,

I use struts and I have an action that redirects to the same page where it came from. Here it goes:

In Firefox, it works just fine. In IE it doesn't. The action executes correctly but the page is not reloaded. If I click on it and choose "Reload" on the pop up menu, I'll see the changes made. But I wish it would reload by itself. Someone would know how?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
This might be due to IE caching the page.

Struts has a control that allows you to direct all browsers not to cache any of your pages. Try setting it and see if this fixes your problem.

To set it, put the following in your struts-config.xml file:

<controller nocache="true">
[ January 18, 2006: Message edited by: Merrill Higginson ]

Consultant, Sima Solutions
Leticia Barbalho
Ranch Hand

Joined: Sep 02, 2005
Posts: 37
Thank you very much for the help, but it did not solve it

Is there any other configuration?

Reid M. Pinchback
Ranch Hand

Joined: Jan 25, 2002
Posts: 775
Your forwardings don't specify redirect="true". You aren't performing a redirect by way of the browser, you are just doing a standard forwarding directly from one servlet component to another.

Reid - SCJP2 (April 2002)
subject: Page doesn't reload after redirect in IE
Similar Threads
newbie problem - populating Action form
forward from one action to another?
Blank page returned when filters are used with struts
problem with LookupDispatchAction
how to populate a bean in a form?