1

I have to use wro4j runtime solution. However, the first request to the server for the processed css file is very slow.

For production mode, I would like wro4j to generate it's files at application startup, to avoid the first slow request.

Here is my scenario, in case someone would advice me on an alternative approach :

I have a maven project which is built once (say generic.war) but customized for each hosted client (client1.war, client2.war etc).
For each client the appearance of the app can be overriden at different levels.

So I have a generic maven project and then another routine that unpack the war (generic.war), customize it by simply overwriting desired files, and repack it for a specific client (ie : client1.war).

This approach of generating specific wars by overwriting files is already in place and used all the time.

But now I want to use wro4j with this system. The first idea is to do the above, overwriting .less files from the generic files and rely on the runtime wro4j to do the final processing in the specifics wars (client1.war, client2.war etC).

But I don't want the first request to hang, I want the groups already in cache for the first request.

I saw this post, but it's a bit old now and I didn't find how to apply the recommended solution (no example and the part on how to trigger the processing from the ServletContextListener is not clear to me).

Thanks in advance :)

baraber
  • 3,296
  • 27
  • 46

0 Answers0