Sending multiple parameters to servlets from either JSP or HTML
问题 I need to send a particular parameters to Servlet from JSP page. E.g: if I click on the Facebook icon on the web page, then I should send "facebook" as parameter to my Servlet and my Servlet will respond according to the parameter received from JSP file or HTML file. 回答1: Just wrap the icon in a link with a query string like so <a href="servleturl?name=facebook"><img src="facebook.png" /></a> In the doGet() method of the servlet just get and handle it as follows String name = request