Currently, I'm using Velocity instead of JSP, for its flexibility. For some reasons, I need to distribute my web modules in jar
archive, rather than war
archive`.
I have read the servlet specification, though, but I didn't find a way to programmatic invoke the jasper engine.
My idea is, split web application to several modules:
- one top-level
war
module, which containsweb.xml
, and all 3rd-party jar dependencies. - other
jar
modules contains http servlets (jsp
is a special form of servlet).
It's very easy to embed Velocity templates in class resources, so I'm wondering if I can do the same job with JSP?
EDIT
The problem of Velocity is, we have to use some taglibs, JSF, etc. to create a rich web UI, which can't be done by Velocity templates.