• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

sendRedirect() not working in IE6.0

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can you post some code please.
 
Mayur Joshi
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic