日期:2014-05-20  浏览次数:20708 次

关于JAVA BEAN
<%!String   name= "zhangsan ";
      String   num= "1 ";
%>
<jsp:useBean   id= "text "   class= "....... "/>
<jsp:setProperty   name= "text "   property= "name "   value= "这要用到NAME的值.我应该怎么写 "/>

------解决方案--------------------
value = "zhangsan "
jsp:setProperty其实就相当与text.setName( "zhangsan ");
------解决方案--------------------
<jsp:setProperty name= "text " property= "name " value= " <%=this.name%> "/>
------解决方案--------------------
<jsp:setProperty name= "text " property= "name " value= " <%=name%> "/>