Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 4.1.0
    • 4.1.1
    • None
    • None
    • 1
    • Platform Sprint 142, Platform Sprint 143

    Description

      Reproduction path:

      1. create an archetype project
      2. add a custom component which redirects to the homepage, for example
        public class RedirectComponent extends CommonComponent {
            @Override
            public void doBeforeRender(final HstRequest request, final HstResponse response) {
                super.doBeforeRender(request, response);
                Map<String, String[]> queryParams = new HashMap<>();
                queryParams.put("noresults", new String[]{"true"});
                sendRedirect(request.getRequestContext().getResolvedMount().getMount().getHomePage(), request, response, queryParams);
            }
        }
        
      3. configure the component class on some page and link a sitemap called redirect on it
      4. browse the site on http://localhost:8080/site/redirect

      The result is that the page is broken and the following warning will be logged:

      [INFO] [talledLocalContainer] 04.11.2016 14:46:07 WARN  http-nio-8080-exec-1 [AggregationValve.invoke:227] Exception during sendRedirect. java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed
      
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              smuco Saimir Muco (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: