自定义标签如何使用useBean的属性?
例如:
<jsp:useBean id="student" scope="page" class="regjsp.StudentInfo" />
<jsp:setProperty name="student" property="name" param="txtName"/>
<jsp:setProperty name="student" property="password" param="txtPass"/>
<reg:sql name="<jsp:getProperty name=student property=name />" password="<jsp:getProperty name=student property=password />" >
</reg:sql>
自定义标签reg:sql要获得Bean的name和password属性,该如何做?
------解决方案--------------------<reg:sql name=" <%=student.getName()%>" password=" <%=student.getPassword()%>" >
</reg:sql >
------解决方案--------------------<reg:sql name="${student.getName()}" password="${student.getPassword()}" >
</reg:sql >