문제

I have a servlet that redirects to a jsp page using response.sendRedirect(), It works fine in firefox, but in IE6 it does not redirect to this page. Can anyone help me with this please?

도움이 되었습니까?

해결책

This might help you: http://www.coderanch.com/t/443561/Servlets/java/sendRedirect-working.

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);
}  

Please note that IE6 is no longer maintained. Microsoft publishes no security fixes which makes this a very unsafe browser.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top