【发布时间】:2011-08-02 18:04:07
【问题描述】:
试图获取<spring:bind> 标签。我正在尝试打印一个字符串值。代码如下所示:
mySimpleBean myBean = presentStudent.getSubjects().getTeacherName();
String firstName = myBean.getTeacherFirstName()
我从另一个 bean“presentStudent”中获得“myBean”。在 jsp 上我正在尝试:
<spring:bind path="presentStudent.subjects.teacherName.teacherFirstName">
<input type="text" name="${status.expression}" value="${status.value}">
但它不打印任何东西。
“presentStudent”也是这种形式的 commandObject:
<form:form id="stuTeachForm" name="stuTeachForm" method="post" commandName="presentStudent"
action="getStuTeachData.html">
【问题讨论】:
标签: spring jsp spring-mvc jstl jsp-tags