geronimo-iia / winstone

Winstone is a servlet container that was written out of a desire to provide servlet functionality without the bloat that full J2EE compliance introduces.
GNU Lesser General Public License v2.1
22 stars 3 forks source link

Example of embedding Winstone? #27

Open gitblit opened 9 years ago

gitblit commented 9 years ago

Do you have an example of how to embed Winstone? The docs all seem to suggest WAR or filesystem-based deployments.

qazwart commented 9 years ago

Sorry. I just found this page. Jenkins is a project that uses Winstone and you can download it and see how it's embedded.

This allows you to run Jenkins just like this:

$ java -jar jenkins.war

Without Tomcat or any other J2EE server container.

gitblit commented 9 years ago

Thanks for your answer. AFAICT the best you can do with embedding Winstone is to build a standard WAR file with a fully described web.xml, manually explode the WAR in your Main-Class, and call Winstone to load the exploded WAR directory.

I was hoping that Winstone had an API for registering servlets and filters which would avoid polluting the disk with temporary directories but sadly this doesn't seem to be the case.

hrj commented 9 years ago

:+1: Embedding would be a great addition.

geronimo-iia commented 8 years ago

Hello, sorry for lag, you can do it with org.intelligents-ia.winstone:winstone artifact. I just see that doc is not up to date.. In order to avoid temporary directory, you have to set a specific one either with command line (--tempDirectory) or property file (Bootstrap.explodeDirectory). I think that I have to update bootstrap version for last option.

Any help is very welcome :+1:

lwiechec commented 7 years ago

hi, maybe some inspiration can be found here ?