简体   繁体   中英

Getting undefined value while passing hidden value from jsp to servlet

I have a hidden value in JSP.

<input type="hidden" name="selectedtxn" value="" />

And I access the value from servlet.

String selectedTxnNo = request.getParameter("selectedtxn");

But the value I get in servlet is undefined .

Am I doing anything wrong?

您隐藏的输入字段为空value=""这就是为什么您undefined 。给出一些诸如value="test"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM