2 Replies Latest reply on Feb 25, 2011 4:48 PM by mikeeprice

    get request parameters from URL which invoked the application

    mikeeprice

      I am using Seam 2.2.0, Jsf 1.2 and JBoss 5.1.0.


      My application is invoked through another portal like application which handles the login of users and then invokes the other applications by passing in the User name and password via parameters on the URL line.


      How do I obtain the parameter values from the original invoking URL. I am surprised that I am not able to find any documentation on this or an example.


      Thanks for any help.

        • 1. Re: get request parameters from URL which invoked the application
          monkeyden

          Did you try:


          @RequestParameter("username")
          private String username;
          



          Alternatively, you can do it in pages.xml:


          <param name="username" value="#{myBean.username}"
          



          Based on my understanding of the problem, those should do the trick.  If this functionality is what you're referring to, it's documented here:


          Mapping request parameters to the model

          • 2. Re: get request parameters from URL which invoked the application
            mikeeprice

            Thanks for your answer. I use both of those for my normal pages and they work OK. The problem is I need to get the parameters from the initial URL that starts the application. My application is structured like the examples in the SEAM distribution with an index.html page that runs first and has some line that goes to my Home.xhtml page. The parameters form the original URL do not get passed to my Home.xhtml page. If I put a param entry in my pages.xml file under a view-id of /index.html it never gets invoked. I am thinking it might be that SEAM hasn't started up yet. I can't find any examples of anyone doing this. It seems like a lot of applications would need to do this though to avoid multiple logins.


            Thanks.