3 Replies Latest reply on Mar 30, 2008 12:49 AM by pmuir

    Login redirect not propagating every page parameter

      I have a page that can accept any number of GET parameters of any name (with no corresponding mappings in pages.xml), through use of HttpServletRequest. My problem is that when I enable security, when the user is redirected to the login page and then back to the page they were originally trying to access, those parameters are missing. However, if I explicitly list the parameters in pages.xml, then everything works fine (which unfortunately isn't a solution, since I won't know the name of every parameter).


      The problem seems to be in org.jboss.seam.faces.Redirect.captureCurrentView(): it only remembers parameters explicitly in the page context. captureCurrentRequest() looks like it would work, but it's deprecated so I'm guessing it should be avoided. What would be the best solution to my problem?


      I currently have a temporary workaround in place, calling the following method after the org.jboss.seam.security.notLoggedIn event:


      
           public void captureAllParams() {
      
                Redirect redirect = Redirect.instance();
      
                Map<String,Object> parameters = redirect.getParameters();
      
                parameters.putAll( FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap() );
      
           }