• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to change the default label style in Struts2?

 
Richard Vagner
Ranch Hand
Posts: 108
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It maybe very simple but I could not find an answer.

I have the following in login.jsp


Struts2 renders the label username and password from a message properties file with default style. How do I change the label style, like change the font or color of "username" and "password"?

I tried <h2><s:textfield key="username"/></h2> or span class="xxx"... but none of them works.

Thanks,
Rich


Thanks,
Rich
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The easiest way is to override the styles provided automagically by S2 (if you're using the <s:head.../> tag) or just create styles for the classnames emitted by the tags.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic