with this below part of script output is
"<LI><B>param1</B>:" +
request.getParameter("param1") + "\n"+
"<LI><B>param2</B>: "+
request.getParameter("param2") + "\n"+
"<LI><B>param3</B>: "+
request.getParameter("param3") + "\n"+
for URL-http://localhost:8080/servlet/ThreeParams?param3=3¶m2=2¶m1=1
param1: 1
param2: 2
param3: 3
this is correct.
but when I use enumeration then it is giving
Enumeration param_names = request.getParameterNames();
while (param_names.hasMoreElements())
{
String param_name = (String) param_names.nextElement();
String param_value = request.getParameter(param_name);
out.println(" <LI><B>"+param_name+"</B>: "+ param_value +"\n");
}
output is
param3: 3
param2: 2
param1: 1
is Enumeration act as stack?
Yamini.