Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Precompiling Jsp files at Runtime

I need to find out how to precompile jsp files at Runtime for a webapplication.

The situation is this: Plugin's can be added to the webapplication at runtime. These plugin's can contain new jsp files or jsp files that override existing jsp's. In order to make sure that the user sees the correct version, I need to precompile the new version of this file using java code as the webserver doesn't always registers that the jsp file has been changed/added/removed and therefore it doesn't recompile the new version of the jsp file.

Thanks in advance.

like image 527
PascalV Avatar asked Nov 14 '22 05:11

PascalV


1 Answers

Correct - Tomcat and WebLogic do it differently, as do all Java EE app servers. You'll have different ways to do it for different products. Fortunately, the ones I've used have Ant tasks that allow you to automate the pre-compilation step and package the .class files into your WAR.

like image 161
duffymo Avatar answered Dec 18 '22 01:12

duffymo