File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
how to add values to servlet and call that servlet
Joined: Sep 23, 2010
Oct 19, 2010 04:09:28
hi, i want to add some parameters to the
and calll it from jsp page , so how could we do it?
Joined: Aug 03, 2008
Oct 19, 2010 06:52:11
You can generate a link to your servlet, like if the servlet is mapped to /myRequest, then you can add a code like
<a href="myRequest?param1=value¶m2=value">click here<a>
the two parameters that we've added after the ? mark can be retrieved from the servlet using request.getParameter
(I've ignored the context path to keep the example simple, the proper path to the servlet would be
SCJP 6 | SCWCD 5 |
Javaranch SCJP FAQ
Author and ninkuma
Joined: Jan 10, 2002
Oct 19, 2010 08:35:58
Or, submit a form.
Asking smart questions
Books by Bear
I agree. Here's the link:
subject: how to add values to servlet and call that servlet
how ro add CLASSPATH and alias in apache tomcat 5
WSAD - Add existing Servlet to project?
upload file through applet
How to Jsp in servlet
Error: Requested resourse() not available
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014