• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to change the default label style in Struts2?

 
Ranch Hand
Posts: 108
  • 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
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • 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.
 
    Bookmark Topic Watch Topic
  • New Topic