当我们使用 request.setAttribute 和 request.getAttribute 时,我已经阅读了这个论坛本身
它的值只保留到加载 jsp 页面。所以他们建议使用隐藏形式,当我使用该隐藏形式时 - 我似乎无法正确处理。它说不允许 void 值,我确保通过 .setAttribute 存储的所有值都有一些初始化值。
这是显示错误的代码
**org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 83 in the jsp file: /season1.jsp
The method print(boolean) in the type JspWriter is not applicable for the arguments (void)
80: <!-- end .content --></div>
81: </form>
82: <%i=1;%>
83: <input type="hidden" name="epnostorage" value="<%= request.setAttribute("epno", epno) %>" />
84: <input type="hidden" name="casestorage" value="<%= request.setAttribute("case", i) %>" />
85: <%
86: }
An error occurred at line: 84 in the jsp file: /season1.jsp
The method print(boolean) in the type JspWriter is not applicable for the arguments (void)
81: </form>
82: <%i=1;%>
83: <input type="hidden" name="epnostorage" value="<%= request.setAttribute("epno", epno) %>" />
84: <input type="hidden" name="casestorage" value="<%= request.setAttribute("case", i) %>" />
85: <%
86: }
87: else if(i==1)
**