• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sendRedirect() not working in IE6.0

 
Mayur Joshi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In my application I have a page that builds a query and once executed shows the results. There are 2 buttons "View all records" and "Edit query". I'm using sendRedirect to another url once those buttons are clicked. It works in all browsers except IE6. In IE6 the same page is refreshed and the redirect fails. Can anyone help me figuring out what the problem is with sendRedirect and IE6?

Thanks,

Mayur
 
ujjwal soni
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Can you post some code please.
 
Mayur Joshi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the code that is called when you press the "Edit Query" button.

public void editQuery() throws IOException
{
String url = request.getContextPath() + "/search.jsp";
url = response.encodeRedirectURL(url);
//url = response.encodeURL(url);
response.setHeader("Pragma", "No-cache");
response.setHeader("Cache-Control", "no-cache");
response.setHeader("Expires", "1");
response.sendRedirect(url);

}

I added the setHeader() functions as a solution from some other forum for IE6 but with or without those functions it doesn't work. The same page is refreshed on clicking the button.

Thanks,
Mayur
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64959
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to use code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the button on your post.

 
Mayur Joshi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mayur Joshi wrote:Here is the code that is called when you press the "Edit Query" button.


I added the setHeader() functions as a solution from some other forum for IE6 but with or without those functions it doesn't work. The same page is refreshed on clicking the button.

Thanks,
Mayur
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic