File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 8898

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?
 
Similar Threads
Passing values from JSP
Sending checkbox value to two different servlet page
passing initial parameters to jsp
how to dynamically set the action attribute
JSP to Servlet pasing values