Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5689

Nested Redirects and REDIRECT_TO_BUFFER

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.5.11, 6.16.0
    • 6.18.0, 7.0.0-M4
    • None
    • None
    • Windows 7, tomcat 7.0.47

    Description

      When the render strategy is REDIRECT_TO_BUFFER, redirects cannot be nested. After the second redirect, Wicket renders the buffered first page in preference to the second page. The relevant code is in WebPageRenderer.respond:

      		if (bufferedResponse != null)
      		{
      			logger.warn("The Buffered response should be handled by BufferedResponseRequestHandler");
      			// if there is saved response for this URL render it
      			bufferedResponse.writeTo((WebResponse)requestCycle.getResponse());
      		}
      

      The attached quickstart demonstrates the issue. Simply navigate to the home page. The observed behavior is that Page1 is displayed, but I expect Page2 to be displayed.

      I can work around the issue by calling WebApplication.getAndRemoveBufferedResponse() to clear the render buffer, but I am uneasy with this solution since it seems like I am playing with Wicket internals; albeit the function is public.

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            gudujarlson Mike
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: