How to have dynamic css files depending on struts session variable

Posted by MichaelMcCabe on Stack Overflow See other posts from Stack Overflow or by MichaelMcCabe
Published on 2010-05-04T11:24:28Z Indexed on 2010/05/04 11:28 UTC
Read the original article Hit count: 201

Filed under:
|
|

I have a webpage in which i want the css file to be the same name as a session variable I have set.

For example; If the session variable was "blue", i want the page to load the css file blue.css.

I tried something below which didnt work, and I'm now stuck. My knowledge of struts is very limited.

<LINK rel="stylesheet" type="text/css" href="<html:rewrite page='/css/<c:out value="${brand}"/>.css'/>">

© Stack Overflow or respective owner

Related posts about struts-1

Related posts about css