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();
??}
?}
?%>
哈哈,原來Struts2在視圖里是這樣子拿到值的呀