在一个页面1.jsp中有一个form,form的action是2.jsp页面,target是1.jsp中的一个隐藏的iframe,在2.jsp中完成处理后会forward回1.jsp(为了防止页面刷新)现在问题是,在2.jsp中设置了一个request属性sizess
request.setAttribute("sizess","123");
request.getRequestDispatcher("1.jsp?q=102").forward(request, response);,在1.jsp中有这么一段
<%
 Object errorinfo = request.getAttribute("sizess");
 boolean erflag = false;
 if ( errorinfo != null)
 {
  errorinfo = request.getAttribute("sizess").toString();
  erflag = true;
  out.println(errorinfo);
 }
%>
<script language="JavaScript">
if (<%=erflag%>)
 alert("<%=errorinfo%>");
</script>从2.jsp回到1.jsp以后,会成功地弹出对话框,对话框里是request里属性的内容(errorinfo),但是out.println(errorinfo却不能输出任何信息,如果加入
<%=errorinfo%> ,也会是空的,求指点