JSP engines without webserver

java, jsp, webserver

Solution

This will be a very difficult task. You will lose the benefit of runtime compilation, hot deploy, mapping, jsp precompilation / caching and probably much more.

Outlooking these facts, you can always compile your JSPs with some of the tools that are already provided by the app server.

Here is a short sample :

- Apache Jasper, you can download from maven the standalone api from here and have a look at the javadoc here.

- Weblogic jspc : here

- You own parser ???

Ant has bundled a bunch of optional tasks that you could call to [pre]compile your jsps :

- Weblogic Compilation task

- Japser Compilation task

Then call ant from your server logic (Is it possible to call Ant or NSIS scripts from Java code?) or precompile your JSPs when you build your server.

Also, if it's all about creating a web container then why not just write plain and simple servlets.

Problem

Within the scope of implementing my own webserver in Java I want to support JSPs. For the moment I don't want to write a JSP engine myself but use an existing one. I found several JSP engines (e.g. `Jasper` or `Jakarta`) but they all come within their own webservers. Is there a JSP engine implementation that is available as a standalone library?

Original source

Related problems