About HttpServer request in JCAPS [Getting value of parameter by its name]

Hi,

I want to know how to get a http parameter value by its name.

In JCAPS 5.1.1, i created a jcd with existing web service operation.

sun seebeyond->eWays->HttpServer->HttpServer->processRequest.

According to my knowledge, in JCAPS a http request will be

processed by a servlet[HttpServlet].

In normal servlet program we can get a parameter value by using its

parameter name(HttpServletRequest object).

e.g request.getParameter("parametername"); which returns parameter

value.

But in JCAPS 5.1.1, provision is there to get parameter name seperately and parameter values seperately.

Please let me know, is there any way to get a parameter value using its parameter name. If not possible please let me know the reason for restricting to get parameter value by its name.

Regards

Venkatesh.S

[897 byte] By [VenkateshSampoornama] at [2007-11-26 23:35:44]
# 1

Hi,

I personally use a converter function that loops through the WebParameterList[] available in the ParameterInfo property of the HTTP Server OTD. Something like:

private java.util.Map getParameterMap(WebParameterList[] parameters) {

Map res = new HashMap();

for (int i=0;i<parameters.length;i++)

res.put(parameters.getName(),parameters.getValues()[0]);

return res;

}

and I do this in the handler method:

Map parameters = getParameterMap(input.getRequest().getParameterInfo().getParameterList());

I don't have an ED install at hand now so the code isn't exact but I think you'll get the picture.

Cheers,

Celso>

Cliffb53a at 2007-7-11 14:57:40 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...