• 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 in requesting a parameter

 
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I need to get a parameter in my program.I am working in asteriskjava.I used the method request.getParameter(String name) .
even i have hardcoded the string name like


String param=request.getParameter("chennai");
System.out.println(param);


when i compile this i am getting null instead of chennai.please anyone assist me

Thanks.
 
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
Where does this parameter come from ? Did you post the parameter from an html form, or via the URL ?

It sounds like a servlet question. There is a servlets forum where you can ask this kind of question.
 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Parameters in a request are set by the HTML client when the request is created, typically form elements (input and file elements to be exact) within a HTML form. Therefore if the form that called your servlet/JSP page had an element with a name "chennai", you would retrieve the value of that form element by using getParameter("chennai").
 
preethi Ayyappan
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually here i am using asterisk and this request.getParameter wii retreive the data from the asterisk.if a person calls from chennai,it will be displayed in the asterisk console like


agi://localhost/hello.agi?location=chennai


from this console i have to get the parameter chennai.neither servlet or jsp is used here.but i am not getting the parameter eventhough i hardcoded the parameter.thats why i am confused why it is displaying null even the string i have passed is chennai directly.
 
reply
    Bookmark Topic Watch Topic
  • New Topic