在使用struts2的時候發現如果按照默認的方式使用<s:textfield>標籤,會自動加上<tr><td>標籤,比如
<s:textfield key="username"/>
會顯示成
<tr><td><input type=text name=username/></td></tr>
有時候並不需要這些td tr,所以可以這樣寫
<s:textfield key="username" theme="simple"/>
或者在struts.xml中加入
<constant name="struts.ui.theme" value="simple" />
這樣全部默認使用simple
注:默認的theme是xhtml
http://blog.csdn.net/mydwr/article/details/8239593