即使有很多答案可用于这个问题,我仍然无法找到我失踪的东西。下面是我的代码,我试图从主jsp传递irepno参数到另一个使用查询参数。但我收到空。请有人帮忙找出是什么错误。从一个jsp传递参数到另一个
main.jsp
<a href="printcurreport.jsp?irepno=${irepno}">Print Current Report</a>
printcurreport.jsp
String repno = request.getParameter("irepno");
<label>IRno:</label><input type="text" name="irepno" id="irepno" class="inp" value="<%=session.getAttribute("irepno")%>" /><br><br>
格式是?param = value。因此,如果$ {irepno}不为null,则使用getParameter(“param”)来访问param的值,即getParameter(“repno”)将工作。 –