Struts2 Struts 2文本字段标签不';表中未显示

Struts2 Struts 2文本字段标签不';表中未显示,struts2,tags,textfield,Struts2,Tags,Textfield,下面使用struts2标记的jsp文件片段不显示textfield标签。我怎样才能解决这个问题?是否可以仅使用struts2标签来显示标签 <s:form action="voucher" theme="simple"> <table width=50% border="5"> <tr> <td> <s:textfield label="Enter the voucher hrn"

下面使用struts2标记的jsp文件片段不显示textfield标签。我怎样才能解决这个问题?是否可以仅使用struts2标签来显示标签

<s:form action="voucher" theme="simple">
    <table  width=50% border="5"> 
      <tr>
          <td>
         <s:textfield label="Enter the voucher hrn"  name="voucher.SN" />
          </td>
          <td>
         <s:submit value="Check state" />
          </td>
      </tr>
      <tr>
          <td>
         <s:radio  list="#{'used': 'Mark as used', 'available': 'Mark as available'}" name="selections" value="%{'used'}"></s:radio>
          </td>
          <td>
         <s:submit value="Update state" />
          </td>
      </tr>
        </table>
</s:form>


这是因为您在表单中使用了
简单的
主题。从
标记中删除
theme=“simple”
,然后Struts2将为您完成表格布局以及字段错误和标签。

顺便说一句,如果你真的需要使用你的自定义布局,那么使用标签标签。

这是因为你在表单中使用了
简单的
主题。从
标记中删除
theme=“simple”
,然后Struts2将为您完成表格布局以及字段错误和标签。

顺便说一句,如果你真的需要使用你的自定义布局,那么使用标签标签。

删除主题会产生奇怪的布局。添加标签标签将显示所需的页面。谢谢删除主题会产生奇怪的布局。添加标签标签将显示所需的页面。谢谢