java jsp页面如何接收保存在类中session的验证码

2025-02-27 18:21:31
推荐回答(5个)
回答1:

1、在图形验证码程序的生成过程中(一般中servlet中生成),使用session.setAttribute("code",yourCode);

2、在jsp页面接收是用session.getAttribute("code")即可

希望能够帮到你,
如若你有不清楚的,欢迎探讨。
淘宝会员:宜人家园

回答2:

你可以将值通过request。setArrtiBute(“dd”,dd);传递过去呀,然后在jsp通过request。gettArrtiBute(‘dd’)获取

回答3:

session.getAttribute("xxx");

回答4:

request.getSession.getAttribute("Attribute name");

回答5:

el 表达式{$sessionScope.sessionName}可以了.
jsp 中
<%
String xxx=session.getAttribute("xxx");

%>这样就可以得到了.