Ronny,
Take a look at the Servlet API Javadocs:
http://java.sun.com/products/servlet/2.3/javadoc/index.html

You will need to use the request.getParameterNames() method to get an
enumeration of the form parameters and then count them.

ie.

Enumeration eNames = request.getParameterNames();
int elementCount = 0;
while (eNames.hasMoreElements()) {
         elementCount++;
         eNames.nextElement();
}

the getParameterNames() method returns an enumeration of all of the names
of the request parameters. To get the values, you need to use
getParameter(String name) or getParameterValues(String name) if the
parameter name has multiple values.

Regards,

Richard


At 03:24 PM 5/29/2002 +0200, Ronny Van der Perre [Smart IT Systems] wrote:
>How can I count how many form elements are submitted ?
>
>I am looking for the JSP-equivalent of the ASP "Request.Form.Count"
>
>
>
>thanks
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://archives.java.sun.com/jsp-interest.html
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.jsp
>  http://www.jguru.com/faq/index.jsp
>  http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to