Out project uses WebLogic as web-server and uses mostly JSP for user interface. With standard setup it is possible to copy edited JSP files into the exploded deployment directory and WebLogic will automatically pick them up, recompile and serve new content through HTTP. However, is it possible to avoid copying at all, so that I just save a file in my editor and it is immediately (well, after a couple of seconds for recompilation) visible?
The project uses Apache Ant as building tool. I would imagine what I want would be possible with symlinks (since this is for deployment only I don’t care about cross-platformity), but then I don’t see how it is possible to symlink lots of files at once with Ant.
So, how do I achieve save-JSP-hit-F5-in-browser functionality either
- with some setting in WebLogic; or
- with symlinking JSPs using Apache Ant (instead of copying them as is done now); or
- something else completely?
In the end, I had to use Ant’s
exectool, because itssymlinkis very inconvenient. Additionally,deletefollows symbolic links by default, which I find a horrible design decision (luckily I didn’t delete anything not recoverable from VCS). If it is instructed to not follow links, then it doesn’t delete them either (there’s a flag for it in 1.8 but I have to use an older version). So, I had to replace clean target’sdeletewithexecthat essentially just runsrm -r— it is easier than 20+ lines of Ant mumbo-jumbo.Also, if anyone is going to do something similar: don’t forget to use
-toption tolnif creating symlinks to directories. Otherwise, a repetetive run will create another link inside the directory symlink points to.All in all it is working now, but I’m disappointed with Ant. I guess this all comes from Java’s absent symlink support, but still…