Thanks guys you given me an idea. To store perhaps the actual personalisation
in database table.

stylesheet.jsp:

<% response.setContentType("text/css"); %>

h1 {
     <bean:write name="styleBean" write="h1Style" />
}

Where I could create a table CSSDEF

Element ,  Name, Defn

"h1" | "red" | "color:#FF0000 ;"
"h1" | "green" | "color:#00FF00 ; "
"h1" | "blue" | "color:#0000FF; "

select  Element , Defn from CSSDEF where Name="Red" and Element="h1"

I will think about this a bit more, still fuzzy ...

--
Peter Pilgrim          |  |        ++44 (0)207-545-9923
            .... \  \  ___   /  / ... .
            -   ----  ( * )  ---   --
_____________________________Cafe_Savannah,_San Antonio,Ibiza__



---------------------------------------- Message History 
----------------------------------------


From: "Gregor Rayman" <[EMAIL PROTECTED]> on 07/09/2001 12:37 ZE2

Please respond to [EMAIL PROTECTED]

To:   <[EMAIL PROTECTED]>
cc:
Subject:  Re: Personalisation Best Practice


"Peter Pilgrim" <[EMAIL PROTECTED]>



> How do I get a  "*.css" file recognised as valid Java Server Page?
> --
> Peter Pilgrim          |  |        ++44 (0)207-545-9923
>             .... \  \  ___   /  / ... .
>             -   ----  ( * )  ---   --
> _____________________________Cafe_Savannah,_San Antonio,Ibiza__

You do not need that.

You can do something like this:

in your html.jsp:


<LINK REL="stylesheet"
      TYPE="text/css"
      HREF='<%= response.encodeURL("stylesheet.jsp") %>'>


and stylesheet.jsp would produce the generated stylesheet, something
like this:

stylesheet.jsp:

<% response.setContentType("text/css"); %>

h1 {
  <% if (likeItRed) { %>
    color: red;
  <% } else { %>
    color: blue;
  <% } %>
}


(better use the <logic:*> tags)

--
gR







--

This e-mail may contain confidential and/or privileged information. If you are not the 
intended recipient (or have received this e-mail in error) please notify the sender 
immediately and destroy this e-mail. Any unauthorized copying, disclosure or 
distribution of the material in this e-mail is strictly forbidden.


Reply via email to