2012-09-12 16 views

回答

0

對於JSP,您需要使用表達式語言。對於參數,它看起來像${param['mycom.productId']}。查看documentation瞭解更多詳情

-1

HttpServletRequest有一個getParameter方法。下面顯示了獲取參數「name」的示例,其中req是HttpServletRequest。我還建議閱讀@JB Nizet的答案。

String name = req.getParameter("name")); 
+0

如何將jsp頁面中的(String name = req.getParameter(「name」);)傳遞給servlet進行處理而不使用會話。 注意:通過jsp –

+0

中的表單動作調用servlet您需要提交參數值作爲表單輸入(例如文本輸入或隱藏輸入) –

+0

非常感謝......我可能會嘗試將其作爲隱藏輸入傳遞 –