form中 private Long readerId; //读者Id public Long getReaderId() { return readerId; } public void setReaderId(Long readerId) { this.readerId = readerId; } Controller Long readerId=readerLoginQueryForm.getReaderId(); JSP <!-- Parameter for hidden --> <input name="readerId" id="readerId" type="hidden" value="${reader.id}"/> <!-- Parameter for hidden end --> 这样可以接收数据不 这样写好像接收不到 |
|
10分 |
@RequestMapping("/xxx") public String rm(ReaderLoginQueryForm readerLoginQueryForm){ //Long readerId=readerLoginQueryForm.getReaderId(); } <form name="readerLoginQueryForm" action="/xxx"> <input name="readerId" id="readerId" type="hidden" value="${reader.id}"/> </form> |
10分 |
Controller 的方法参数里写 ( Long readerId )
|