Struts2 OGNL

Struts2中的ValueStack
<%
Enumeration em = request.getAttributeNames();
while(em.hasMoreElements()){
  Object obj = em.nextElement();
  if(obj.equals("struts.valueStack")){
   ValueStack vs = (ValueStack)request.getAttribute("struts.valueStack");
   System.out.println(vs.findValue("username"));
   System.out.println(vs.findValue("password"));
   System.out.println(vs.findValue("[0].username"));
   System.out.println(vs.findValue("[0].password"));
   vs.toString();
  }
}
%>

你可能感兴趣的:(struts)