You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-user@portals.apache.org by Prerana Padgaonkar <pp...@firstrain.com> on 2004/03/16 11:08:02 UTC

Problems with req.getParameterNames, PortalControlParameter.getPIDValue is ""

Hi... am a user of Pluto and have been working with portlet code which dispatches the request to my servlet. Facing problems retrieving the request parameters later in my servlet application.

In my portlet code, I am trying to reach my servlet using PortletRequestDispatcher rd = context.getRequestDispatcher("/mytest/op?param1=v1"); After calling rd.include, the control correctly reaches my servlet. But there, req.getParameterNames yields an empty Enumeration. The debugger shows that the parameter "param1" does exist in the request object. Tried to debug further into the "getParameterNames" implementation and found the location in pluto code where the mismatch was happening.

file: jakarta-pluto/portal/src/java/org/apache/pluto/portalImpl/servlet/ServletRequestImpl.java
method: getParameterMap()
line: 90 
code snip :
        String pid = control.getPIDValue();
        String wid = portletWindow.getId().toString();
        if (pid.equals(wid)) { ... populate the correct parameter map ... }

In my case, pid is "" where as wid is something like "mytest.row.col1.my_p1" (which seems to be derived from pageregistry.xml). since the 2 are not equal, the if-block is never executed and I get an empty parameter map. Tried in the debugger to modify "pid" at runtime, and confirmed that things are as I would need them when pid=wid. So, I need to figure out a way whereby pid is correctly set, what exactly governs "pid"? how do I get the correct parameter map? any information about "pid" would be appreciated.

thanks
Prerana