How to change textbox label color in Struts 2
You can do this using the CSS attribute selector. Give your <s:textfield>id and specify that id in CSS as follows:
<style type="text/css">
label[for="nameFieldId"] {
color: red;
}
</style>
<s:textfield id="nameFieldId" name="name" key="user.name"/>
This will work because the theme xhtmlgenerates <label>for the tag <s:textfield>with the attribute for.
Can you try under the code
<s:label value="user.name" cssStyle="color: #ffffff;"/>
<s:textfield name="name" required="true"/>
Struts . http://www.mkyong.com/struts2/working-with-struts-2-theme-template/ ( )