Please open a jira-issue in our bug-tracker, and attach a patch there
(line-numbers should be included!)

regards,

Martin

On 2/28/07, Hanack, Leif <[EMAIL PROTECTED]> wrote:


Hello,

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:
    public void redirect(String url) throws IOException
    {
        if (_servletResponse instanceof HttpServletResponse)
        {

((HttpServletResponse)_servletResponse).sendRedirect(url);
            FacesContext.getCurrentInstance().responseComplete();

        }
        else
        {
            throw new IllegalArgumentException("Only HttpServletResponse
supported");
        }
    }

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!

I know that this code-snipplet will solve my problem:


String encodedUrl =
((HttpServletResponse)_servletResponse).encodeURL(url);
((HttpServletResponse)_servletResponse).sendRedirect(encodedUrl);

Did not no if this is a bug. Hope it is, and my patch will be integrated:)

What do you think?!

Thanks in advance, Leif


Mit freundlichen Grüßen

Leif Hanack
Software Development

Hypoport AG
Klosterstraße 71
D-10179 Berlin
Tel.:  +49 (0)30 / 4 20 86 - 292
Fax.: +49 (0)30 / 4 20 86 - 199

E-Mail:   [EMAIL PROTECTED]
Internet: www.hypoport.de



Vorstand: Prof. Dr. Thomas Kretschmar (Co-CEO),
Ronald Slabke (Co-CEO), Marco Kisperth

Aufsichtsrat: Dr. Ottheinz Jung-Senssfelder (Vors.),
Jochen Althoff (stellv. Vors.), Christian Schröder

Handelsregister: HRB 74559, Berlin-Charlottenburg
USt-IdNr.: DE207938067



--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Reply via email to