Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a compact, embeddable Servlet container suitable for use with Vaadin?

I'm developing a desktop application in Java, and I want to use vaadin as a user interface for it (so the user will access it through their web browser). I'm using Maven, so it is greatly preferred if all of my dependencies are available through Maven (Vaadin is).

Vaadin requires a servlet container, so I need to find a servlet container that I can embed in my app, which won't significantly increase the size of my distributable file (I'm hoping to keep it under several megabytes).

I looked at Jetty, but the latest version supported as a Maven dependency that I could find is 5.1.10, which is ancient. There is a Maven plugin, but that tries to take over control of starting and stopping your entire app, which isn't appropriate here (the UI, which Jetty will be part of, is just a small part of the overall app).

Can anyone recommend a small, easily embeddable servlet container that might be suitable for this? Extra points if you can provide pointers on how to use it together with Vaadin :-)

like image 939
sanity Avatar asked Jun 12 '26 10:06

sanity


2 Answers

I'm using Jetty 8 with Maven. The artifact changed name to jetty-server and moved to Eclipse infrascruture. Link for the tutorial: http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin Basicaly:

<plugin>
   <groupId>org.mortbay.jetty</groupId>
   <artifactId>jetty-maven-plugin</artifactId>
</plugin>

Run

mvn jetty:run

And you are done.

like image 126
Anthony Accioly Avatar answered Jun 14 '26 01:06

Anthony Accioly


Tomcat 7 is embeddable as well.

like image 21
BalusC Avatar answered Jun 13 '26 23:06

BalusC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!