为什么session,getattribute 取不到 request,setattribute 的值
<%
request.setCharacterEncoding("utf-8");
request.setAttribute("req", "reqv");
out.println(request.getAttribute("req"));
out.println(session.getAttribute("req"));
%>
结果为:reqv,null
<%
request.setCharacterEncoding("utf-8");
request.setAttribute("req", "reqv");
out.println(request.getAttribute("req"));
out.println(session.getAttribute("req"));
%>
结果为:reqv,null
2018-03-09
举报