4 Replies Latest reply on Apr 14, 2009 4:25 PM by marc.chitwood

    Redirect is not working

    israel.bgf

      The is not working, it sends the user to the "outside" application, not the one in the portal. And the gives an error. Example from the pages.xml:


      <redirect view-id="/errorPage.xhtml">
      Error!



      When the exception is throw i'm redirected to the localhost:8080/appName/errorPage.seam, not the localhost:8080/portal/portal/verystrangeulr...

      I tested it even with the seamBookingPortlet sample that comes with the portlet bridge, and I got the same problem. Is it a limitation of the bridge? Is there any tweaking that can solve this problem?

      thks in advance,

      israel

        • 1. Re: Redirect is not working
          israel.bgf

          Ops, sorry let me try to post the example again:

          <exception class="com.nexxera.aen.business.BusinessException">
           <redirect>
           <message severity="ERROR">#{messageHandler.formatMessage(org.jboss.seam.handledException)}</message>
           </redirect>
           </exception>
          


          • 2. Re: Redirect is not working
            wesleyhales

            This is a known (and actually the first) issue reported in the bridge.
            https://jira.jboss.org/jira/browse/PBR-1.
            It is on the list for next release.

            • 3. Re: Redirect is not working
              sverker

              Isn't this also a conceptual issue?

              In a portlet I might want to redirect to a view id in the same portlet application, or I might want to redirect to a page in the portal. Both are valid usecases but how to distinguis between them?

              Maybe the notation should be <redirect view-id="xxxx"/ when selecting another view id inside the portlet and when redirecting outside the portlet.

              What is the current status on PBR-1 btw?

              • 4. Re: Redirect is not working

                I'm also having a similar issue in that I cannot redirect from a JSF bean.

                FacesContext context = FacesContext.getCurrentInstance();
                HttpServletResponse response =
                (HttpServletResponse)context.getExternalContext().getResponse();
                response.sendRedirect("/some.jsp ");

                Takes me to a blank page. This code works using the JSF portlet bridge.