Try this from the page containing the form:
        First you should set the DisplayType as a hidden field, although it might
work in the action value:
                <input type="hidden" name="DisplayType" value="B">


You can now reference the form's field values with the
request.getParameter() method in the destination page.
        String displayType = request.getParameter("DisplayType");


If you don't know what the field names are that were passed to you, try
this:
        Enumeration paramNames = request.getParameterNames();
        while (paramNames.hasMoreValues() )
        {
                String theName = (String)paramNames.nextElement();
                String theValue = request.getParameter(theName);
                out.println(theName + " = " + theValue + "<BR>");
        }
        out.flush();


A very good reference book is Java Servlet Programming by Jason Hunter from
O'Reilly.

Cor


-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Johnson Jeffrey
Sent: Tuesday, November 09, 1999 7:25 PM
To: [EMAIL PROTECTED]
Subject: Passing paramaters in the form "post" event


Hi all,

If I have my form post defined as <form method="POST"
action="/nynav/jsp/uacctlst.jsp?DisplayType=B" etc...>

How do I retrieve "DisplayType" in uacctlst.jsp?  Also, how do I retrieve
any
of the form values posted?  I'm pretty new at this and appreciate any help
offered.

Thank in advance.

Jeff

===========================================================================
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

===========================================================================
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