ServletExternalContextImpl.redirect did not encode URL, so URL-rewriting fail -----------------------------------------------------------------------------
Key: MYFACES-1547 URL: https://issues.apache.org/jira/browse/MYFACES-1547 Project: MyFaces Core Issue Type: Bug Components: General Affects Versions: 1.1.5 Reporter: Leif Hanack I'm using Spring WebFlow (SWF) in combination with MyFaces/Trinidad. I have the problem that the FlowPhaseListener from SWF is calling a method that triggers ServletExternalContextImpl.redirect be to called. ServletExternalContextImpl.java 489 public void redirect(String url) throws IOException 490 { 491 if (_servletResponse instanceof HttpServletResponse) 492 { 493 ((HttpServletResponse)_servletResponse).sendRedirect(url); 494 FacesContext.getCurrentInstance().responseComplete(); 495 } 496 else 497 { 498 throw new IllegalArgumentException("Only HttpServletResponse supported"); 499 } 500 } The redirect method is calling a sendRedirect on the response but did not encode the url, so in case of URL-rewriting the jsessionid is not attached! This patch would solve my problem: replace line 493 with the following two lines: String encodedUrl = ((HttpServletResponse)_servletResponse).encodeURL(url); ((HttpServletResponse)_servletResponse).sendRedirect(encodedUrl); Thanks in advance, Leif -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.