1 Reply Latest reply on Feb 11, 2011 6:59 PM by amitev

    Propagating request parameters from root context

    mechtatel

      Hi,


      I want to know if it is possible to propagate request parameters from the root context url path?



      Normally it is possible to propagate the request parameters using param in page.xml:



      <param name="parameter_name"/>



      So if it's made request:


      http://domain/root_context/home.seam?parameter_name=something




      and there is not current session the user is redirected to:



      http://domain/root_context/login.seam?parameter_name=something





      In my case I need to propagate the request parameter from the root context path:



      http://domain/root_context/?parameter_name=something



      That´s because I'm developing Facebook Canvas app.


      I guess that I'm loosing the propagation because of  the use of index.html in welcome list with source:




      <html><head><meta http-equiv="Refresh" content="0; URL=home.seam"/></head></html>





      There is a way to accomplish propagation of the request parameter from context root path?



        • 1. Re: Propagating request parameters from root context
          amitev

          Hi Ico!
          You can do that with index.jsp instead of html. In the jsp put a scriptlet where you read the request parameter and if presented, attach it to the redirecting page


          <%
          String param = request.getParameter("param_name");
          String url = "home.seam";
          if (param!=null) {
            url = url + "?param_name=" + param; 
          }
          response.sendRedirect(url);
          %>