aspose file tools*
The moose likes Servlets and the fly likes How to pass the parameter values to the servlets? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to pass the parameter values to the servlets?" Watch "How to pass the parameter values to the servlets?" New topic
Author

How to pass the parameter values to the servlets?

Narasimha Rao B.
Ranch Hand

Joined: Aug 26, 2002
Posts: 205
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.


Narasimha
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

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


Groovy
Narasimha Rao B.
Ranch Hand

Joined: Aug 26, 2002
Posts: 205
Hi Pradeep,
Thanks a lot for your valuable input.

Regards,
Narasimha.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to pass the parameter values to the servlets?