Handling Multi-valued Parameters
public class MultiValue extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
response.setContentType(text/html) ;
PrintWriter out = response.getWriter() ;
String [] pets = request.getParameterValues(pets) ;
out.println(<html><body><head></head>) ;
out.println(Your pets:<p>) ;
out.println(<table border cellspacing=0 cellpadding=5>) ;
for (int i = 0 ; i < pets.length ; i++)
out.println(<tr><td> + pets [i] + </td></tr>) ;
out.println(</table>) ;
out.println(</html></body>) ;