0
我有以下的JSP代碼:從JSP傳遞的網址與Servlet
<%
for (int i = 0; i < list.size(); i++) {
Entry var = (Entry) list.get(i);
//[...]
String Cn = var.getCn();
out.println(" <form method=\"get\" action=\"NewServlet\"> "+ "<input \
type=\"submit\" name=\"act\" value=\" " + var.getCn() + " \" > " + "</form>");
out.println("<br>--------------------<br>");
}
%>
我想參數var.getCn()
發送到servlet,但我不知道如何從servlet抓住它。我怎樣才能做到這一點?
//[....]
String Cn = new String();
Cn = request.getParameter("???");
//[....]