Forums Register Login

Problem with request.getParameterValues

+Pie Number of slices to send: Send
Hi
Iam trying to pass two values through url.

String url="SalesByPaymodeMontly?paydate="+paydate+"&"+" paydate1="+paydate1;

In my SalesByPaymodeMontly Servlet,I couldn't access the second parameter passed in the url.It gives me a null pointer exception.

Any one please let me know how to use request.getparameterValues or any other way to access the second parameter.

Any sample code will help

Regards
Sreelekha
+Pie Number of slices to send: Send
 

or any other way to access the second parameter


request.getParameter("paydate1");

And remove the space you seem to have before paydate1 in your url.
+Pie Number of slices to send: Send
Hey thanks a lot , It worked...
+Pie Number of slices to send: Send
Hi
request.getParameterValues() method is for getting the array of values of an argument. For example if you have a list box where the user can make more than one like two or three, then we will use getParameterValues() method.
Come to your problem i think it is because of space problem.Remove that one.
then you can get using getParameter() method with the argument name.
hope i gave the needful
It's a tiny ad only because the water is so cold.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1784 times.
Similar Threads
How to call a servlet from JSF without using dispatch(url)
getting paramerts in another page
getParameters names from jsp?
classes inside an interface
unable to understand paramValues implicit Object
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 06:18:32.