Meng, Dong J wrote:
>I have one HTML form with mutiple buttons in a servlet class. If I click
>different button, it will go to different servlet page.
>How do the servlet know which button have been clicked? Do you have similar
>code for this question?
One possible way is to have more than one form tag on the page:
out.println("<form action=http://server1.someplace.com/servlet/ServletA
method=POST>");
out.println("<input type=\"submit\" value=\"Enter\" name=\"B1\">");
out.println("</form>");
out.println("<form action=http://server1.someplace.com/servlet/ServletB
method=GET>");
out.println("<input type=\"submit\" value=\"Return To Main Menu\"
name=\"HomeSubmit\">");
out.println("</form>");
Mike
___________________________________________________________________________
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