> -----Original Message-----
> From: A mailing list about Java Server Pages specification
> and reference
>
> I have two JSP files, ap1 and ap2. In ap1 I have a form, and
> when I push
> "submit", the action is "action=ap2.jsp".
>
> In ap2.jsp I receive the values of the fields from the form in ap1.jsp
> ... how can I pass these values? How can I get these values from the
> form?
>
> In ASP I use something like that:
>
> > item = request("item")

String item = request.getParameter("item");

or

String[] items = getParameterValues("item");

if there can be more than one field in your form with the same name.

See also Java API docs for javax.servlet.ServletRequest.

You might also want to consider creating bean objects and <jsp:useBean/>
<jsp:setProperty/> <jsp:getProperty/> tags in your JSPs.

HTH,

Steve

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to