• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem with request.getParameterValues

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
sree lekha
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey thanks a lot , It worked...
 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic