This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
We are doing a POC currently wherein we need to get the System colours in the JSP file. Example: If user has set a specific theme, we want to be able to get the theme details through API's on the JSP. Based on these we want to apply colours to some custom display components.
All we are getting is AWT related classes. And that too is the server system colours and not the client's.
We need help in knowing if we can get this info by not using AWT? Is it feasible?
Jsp's are converted to servlet and live in the container.From this you can at best get server properties ,not client properties. If you would like to go for a complex solution then you might have to do some applet stuff to take the required information from the client system and send those to server , so that going forward server can generate views using this information.
By the way , how can you get theme properties ? Is this something set in the environment variables ?
Then all your web application has to remember is which CSS to link to in each user's pages - just one line in your JSP.
I agree with the "use CSS' recommendation. CSS actually allows you to assign system colors to elements. For example, a color of "ButtonFace" causes the styled element to be colored as a standard system button's background would. So for example, if you were creating a small span that you wanted to look like a button, you might apply these styles (among others):