struts2 中是否必须使用 struts-tags。我的意思是我们不能使用以下内容:
<td bgcolor="DEDBC6"><div align="left"><font color="#000000"><strong>
Employee Name * :</strong></font></div></td>
<td><input name="empname" type="text" id="empname" size="32"></td>
而不是跟随:
<s:textfield label="Employee Salary " name="empsal" required="true"/>
我已经尝试了这两种方法,但是当我使用第一个时,我没有收到验证消息,即我在 action-validation.xml 中编写的“需要 empname”,尽管验证运行良好。 请评论 ?