Pax Web has support for Java Server Pages (JSP) via using Tomcat Jasper 2
Why
Quoted from Java Server Pages home page:
JavaServer Pages (JSP) technology provides a simplified, fast way to create dynamic web content. JSP technology enables rapid development of web-based applications that are server- and platform-independent.
How does it work
First of all you must have your JSPs (not mandatory but useful). Then you have to let Pax Web know that you have jsps by calling the registerJsps() method on WebContainer.
At runtime you have to also deploy the jsp support bundle org.ops4j.pax.web.jsp (see installation instructions bellow) toegether with Pax Web.
You can find an example of the example page.
Tag Libs
In order to get your custom tag libs working your TLD files will have to be reachable in your bundle in "special" places:
- all tld files in any jar referenced by your Bundle-ClassPath manifest entry
- all tld files in WEB-INF directory or sub-directory of WEB-INF in your bundle jar
Please note that your imported packages will not be searched (it may be that this support will be added later on)
Usage
System Requirements
- Java5 virtual machine running on a supported operating system.
- An OSGi framework compliant with the R4 Core specification.
- Pax Web Service.
- (optional) Pax Logging Service.
Manual installation
pax-run mvn:org.ops4j.pax.web/pax-web-jsp
Source code
https://scm.ops4j.org/repos/ops4j/projects/pax/web/jsp ( or browse via FishEye )
This project builds with Apache Maven and uses Apache Felix's maven-bundle-plugin, and Peter Krien's bnd tool.