Many thanks!

>
>An enumeration allows you to run through a collection of objects.  Once
>you've reached the end, it does not go back to the top.  If it did, you
>wouldn't know when you reached the end and you'd have yourself an endless
>loop.  You can however reuse the same enumeration variable like this:
>
>String name;
>String value;
>Enumeration enum = request.getParameterNames();
>Hashtable hash = new Hashtable();
>
><snip>
>
>while(enum.hasMoreElements()) {
>        name = (String)enum.nextElement();
>        value = request.getParameter(name);
>        hash.put(name, value);
>        System.out.println(hash.get(name));
>}
>enum = request.getParameterNames();
>while(enum.hasMoreElements()) {
>      name = (String)enum.nextElement();
>      value = (String)hash.get(name);
>      System.out.println(value);
>      msg.println(name + ": " + value);
>}
>
>     (*Chris*)
>


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to