Sure... You either submit a form, in which case you get at the
elements of the form with:
request.getParameter("someElementNameHere");
....in your servlet (you'll need to cast what that returns to a String
by the way). You said it was a forward though, so no form
submission... In that case, simply append your variables to the URL.
In other words:
<jsp:forward page="yourServlet?variable=value" />
You use the same method to get at the value in the servlet.
Frank W. Zammetti
Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
On Sun, 13 Mar 2005 12:12:29 -0000, "Barry Parker"
<b.********@warwick.ac.uk> wrote:
Is there a way to pass parameters (variables?) from a JSP page to a servlet
when it is called? This way I can use a generic servlet to do several
different tasks. The call to the servlet is made by using the JSP forward
tag.
Cheers in advance, Barry