Vita Rara: A Life Uncommon

Struts 2 Theme vs. CSS

Well, the Struts 2 theme really isn't a replacement for CSS, nor is CSS a replacement for the Struts 2 theme.

The Struts 2 theme is a way of customizing the markup emitted from a template engine (JSP). CSS is a way of styling said markup in the rendering engine (the browser).

Basically creating a theme in S2 just allows you to control the markup that is emitted from the S2 tag library. In my case I wanted the standard tags, which by default do a two column tabled layout of form elements, to emit a variable column width tabled layout.

So, in reply I would say that you can't accomplish the real end result without both the S2 theme, and a CSS style sheet, which combined get you to a final appearance, or what most might think of as a theme, in your browser.

Which raises an issue of terms. A S2 theme really isn't about how the markup should be styled, but what markup is going to be generated.

Mark

Reply

Please solve the math problem above and type in the result. e.g. for 1+1, type 2
  • Allowed HTML tags: <a> <img> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <h1> <h2> <h3>
  • Lines and paragraphs break automatically.
More information about formatting options