Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to pass the parameter values to the servlets?

 
Narasimha Rao B.
Ranch Hand
Posts: 205
  • Mark post as helpful
  • send pies
  • 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.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Hi Pradeep,
Thanks a lot for your valuable input.

Regards,
Narasimha.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic