Wednesday, 19 December 2012

Servlet 3 with Jetty and Maven

To deploy a servlet 3 web app in jetty you need to use jetty 8. To run jetty 8 from maven use the jetty-maven-plugin NOT the maven-jetty-plugin. The maven-jetty-plugin will not work with servlet 3 apps.

Add the following to your pom:

         <!-- Periodically scan to reload servlet if changes found -->
         <!-- Path where servlet will be accessed in this case http://localhost:9090/MyApp-->
            <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">

If you are using the usual locations for config files then the plugin should pick up the configurations. To configure the plugin with additional settings go to:

Now to run your web app with jetty, use the following gaol:


  1. I think this is the best article today. Thanks for taking your own time to discuss this topic, I feel happy about that curiosity has increased to learn more about this topic. Keep sharing your information regularly for my future reference.
    Java Courses in chennai

  2. Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.
    Digital Marketing Training

  3. I think this is an informative post and knowledgeable. Thank you for sharing this wonderful post! I’m glad that I came across your article.
    Java Training in Chennai/Java Training in Chennai with Placements