6 Replies Latest reply on Mar 9, 2007 6:54 PM by Gyanendra Hyoju

    Passing parameters in an URL

    Adam Warski Master

      Hello,
      I have some trouble passing parameters through URL.
      If I make a renderURL (in a JSP, with an appropriate tag) and add inside the tag some <portlet:param ...> then I see the parameters through request.getParameter() (where request is of class JBossRenderRequest). Moreover, these parameters stay in the session. (Of course it can't have anything to do with the tag, it's just that the URL is a render URL and looks like this:
      http://localhost:8080/portal/index.html?ctrl:id=window.demo.SomeName&ctrl:type=render&ctrl:windowstate=maximized&param1=value1))
      Here, request.getURL() returns null.

      When I try make a link to another page, something like:
      http://localhost:8080/portal/index.html?ctrl:id=page.default.pageXXX&param1=value1
      In this case, there are no paramters available through request.getParameter(). However, request.getURL() returns the URL and I have to parse the parameters myself.

      Moreover, what I have observed, is that parameters work only the easy way (that is, are accessible through request.getParameter()) when ctrl:type is render. With ctrl:type=nav it doesn't work, the behaviour is the same as with the page URL.

      Now, should it be so? Is there another way to always access the URL parameters in a uniform way?