Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to read request parameters


I am trying to port a JSR-168 portlet to a SAP iView that descends from AbstractPortalComponent. So far everything was pretty straightforward, but now I'm stuck on this silly little thing...

Here is an example with the JSR-168 code I am trying to port:

private String exampleMethod(ActionRequest request) 
  String queryString = "";
  Enumeration paramNames = req.getParameterNames();
  // add all the request parameters to a query string
  while (paramNames.hasMoreElements()) 
    String name = (String) paramNames.nextElement();
    String[] parameterValues = req.getParameterValues(name);
    for (int j = 0; j < parameterValues.length; j++) 
      String value = parameterValues[j];
      queryString.append(name + '=' + value);
      if (j < parameterValues.length-1) 
  return queryString;

Now from the AbstractPortalComponent descendant I do not have access to the ActionRequest class ofcourse, so I am trying to do the same using the IPortalComponentRequest. I see a method getParameter(String name), but how am I to find out which names are valid? There is no getParameterNames() method....

What am I missing here? How should I find out the names of the parameters (if any) that have been passed to the request?

Kind regards,

-Stijn de Witt


Former Member

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question