dynamic CSS and JS includes

Hello,Using JSF here at work and am wondering how to go about adding dynamic content to included .js and .css files. It seems to want to force those types of files to be static only.Thanks,David
[222 byte] By [spiderworma] at [2007-11-27 8:47:13]
# 1
If you want to dynamically generate the contents of your .js or .css files, you will need for them to be served via some sort of servlet. The FacesServlet may work in your case, or it might not. Since all of the JSF components are geared towards outputting HTML, I'm guessing not.
RaymondDeCampoa at 2007-7-12 20:51:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

There are many different ways to do it.

The most simple is to use custom filter. When it will give request string with special format, it will block JSF work and do that you want.

But I think that it is not very good example. Custom servet is possible too, but it can be more difficult.

There is a very good example of building *.js and *.css in project:

http://labs.jboss.com/jbossrichfaces/

Developers give skinability to their components and builds *.css at runtime. You'll see, it works very good.

JSF_custom_tagsa at 2007-7-12 20:51:36 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...