Hi Melvin,
    Have the request as
http://localhost:8080/myservlets/MessageServlet?index=3
(If the page index is 3).

    In servlet, use
    int index = Integer.parseInt(request.getParameter("index"));
    String message = (String)list.get(index);

-sourabh



----- Original Message -----
From: Melvin Grady <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 18, 2002 5:28 PM
Subject: Servlet Question


> I have created a servlet to read form data. The form data has Textboxes,
> Radio Buttons and Checkboxes. The user of my servlet is allowed to enter
> data in the Textboxes, make a selection using the Radio buttons and make
> more than one selection using the Checkboxes and press a Submit button.
This
> is done in the doPost method of the Servlet. My code follows:
>
>
>   /**Process the HTTP Post request*/
>   public void doPost(HttpServletRequest request, HttpServletResponse
> response) throws ServletException, IOException
>   {
>         PrintWriter out = response.getWriter ();
>         out.println("<html><body>");
>         Enumeration enum = request.getParameterNames();
>
>         while (enum.hasMoreElements())
>         {
>             String name = (String)enum.nextElement();
>             String value = request.getParameter(name);
>             out.println(name + " = " + value);
>             out.println("<br>");
>         }
>         out.println("</body></html>");
>     }
>
> Question: How do I display the data in more than one Checkbox in my doPost
> method?
>
>
>
> Melvin
> [EMAIL PROTECTED]
>
>
___________________________________________________________________________
> 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
>

___________________________________________________________________________
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