• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

How to pass the parameter values to the servlets?

 
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Can any of you explain how can i pass the parameter values to my servlet.
One way to pass the parameter values to the servlet, when the servlet is called from the JSP page is -- Call the below method in the servlet,
"request.getParameter("<parametername");"

Now my doubt is , If i invoke my servlet directly from the browser, instead from JSP, how to pass the parameter values. Is there any way to specifiy the parameter values, for a particular servlet, in weblogic.properties. Like specifying the initparametervalues.
I am using Bee Weblogic server 5.0

Thanks in Advance,
Narasimha.
 
Ranch Hand
Posts: 8946
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You will have to pass it as a query parameter i.e. to append the name value pairs to the URL.
For e.g.
http://localhost:7779/webapp/myservlet?name=pradeep
 
Narasimha Rao B.
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Pradeep,
Thanks a lot for your valuable input.

Regards,
Narasimha.
 
You’ll find me in my office. I’ll probably be drinking. And reading this tiny ad.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic