Forums Register Login

How to pass the parameter values to the servlets?

+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Hi Pradeep,
Thanks a lot for your valuable input.

Regards,
Narasimha.
No prison can hold Chairface Chippendale. And on a totally different topic ... my stuff:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1033 times.
Similar Threads
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
Passing values from JSP
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 13:24:05.