In fact, this problem has long been aware of, but did not solve it, decided to first set the back of the function to say, now finally resolved. is not a big problem, that is, in the JSP page added struts label is not good typesetting, the page does not show the position of the label is consistent with, baffled by that time, now open Google Browser inspection, and then found that he automatically will be more TR TD some things.
JSP page
<div class= "Form-group" >
<s:select name= "department.id" list= "list" class= "Form-control" listKey= "id" listvalue= "dname" id= "department" >
/s:select>
</div>
Foreground HTML
<div class= "Form-group" >
<tr>
<td class= "Tdlabel" ></td>
<td>
< Select Name= "department.id" id= "department" class= "Classjava.util.HashMap" >
<option value= "1" > Academic Department < /option>
<option value= "2" > Personnel </option>
<option value= "3" > Finance Dept. </option>
<option value= "4" > Department </option>
<option value= "5" > Logistics </option>
<option value= "7 "> Admin </option>
</select>
</td>
</tr>
</div>
So always row bad version ah.
Workaround:
①, in Struts.xml, plus
On behalf of all the pages are simple theme, when it output the page, not back to add any extra code, such as table TR TD, and so on, we can edit the page like other ways to edit the style of the page
②, add theme= "simple" in the label
Reference Blog: http://blog.csdn.net/naivesoft/article/details/6563084
In fact, before watching the learning video to knock code is also used Theme= "simple", but did not know that the role AH-learning