Creating a simple web application on Java in various ways:
# | Techology, library, framework | Initial release date | |
---|---|---|---|
Type | Subtype | ||
1 | HTTP Servlet | web.xml file |
1996-12 |
2 | @WebServlet annotation | ||
3 | ServletContainerInitializer interface implementation | ||
4 | Spring MVC | web.xml file |
2005-12 |
5 | Java configuration | ||
6 | Spring Boot | Spring MVC | 2014-04 |
7 | Spring WebFlux | ||
8 | JavaServer Faces | Eclipse Mojarra | 2004-03-03 |
9 | Apache MyFaces | 2005-11 | |
10 | Google Web Toolkit | 2006-05-16 | |
11 | Grails | 2005-10 | |
12 | Struts | 2000-05 | |
13 | Dropwizard | 2011-12-21 | |
14 | Play | 2008-05 | |
15 | JHipster | 2013-10-21 | |
16 | JAX-RS | Apache CXF | 2008-04 |
17 | RESTEasy | 2008-09 | |
18 | Jersey | 2010-05 | |
19 | Restlet | 2013-01 | |
20 | Vaadin | 2006 | |
21 | Seam | 2007 | |
22 | Wicket | 2005-06 | |
23 | Tapestry | 2000 | |
24 | Spark Java | 2011 | |
25 | Vert.x | 2011 | |
26 | Rapidoid | 2014-08 | |
27 | Lagom | 2016-03 | |
28 | Ratpack | 2013 | |
29 | Javalin | 2017-05-24 | |
30 | Micronaut | 2018-10-23 | |
31 | Quarkus | 2019-11-25 | |
32 | ActFramework | 2017-03-09 | |
33 | MicroProfile | TomEE | 2012-04-27 |
34 | Hammock | 2014-02-27 | |
35 | Thorntail | 2016-01 | |
36 | KumuluzEE | 2016-04-04 | |
37 | Payara Micro | 2017-07 | |
38 | Open Liberty | 2017-09-19 | |
39 | Helidon | 2018-09-19 |
-
Change directory:
cd <maven module directory>
-
From the command line with Maven:
mvn jetty:run
(for helloworld-web-servlet-xml, helloworld-web-servlet-annotation, helloworld-web-servlet-interface-war, helloworld-web-spring-mvc-xml, helloworld-web-spring-mvc-java, helloworld-web-jsf-mojarra, helloworld-web-jsf-myfaces, helloworld-web-struts, helloworld-web-jaxrs-apache-cxf, helloworld-web-jaxrs-resteasy, helloworld-web-jaxrs-jersey, helloworld-web-jaxrs-restlet, helloworld-web-vaadin, helloworld-web-seam, helloworld-web-wicket, helloworld-web-tapestry modules)mvn spring-boot:run
(for helloworld-web-spring-boot-mvc, helloworld-web-spring-boot-webflux, helloworld-web-jhipster modules)mvn gwt:codeserver
(in one terminal window for helloworld-web-gwt-client module)
mvn jetty:run
(in another terminal window for helloworld-web-gwt-server module)mvn grails:run-app
(for helloworld-web-grails module)mvn package
java -jar target/hello-world.jar server hello-world.yml
(for helloworld-web-dropwizard module)mvn clean package
mvn play2:run
(for helloworld-web-play module)mvn package
mvn lagom:runAll
(for helloworld-web-lagom-impl module)mvn package
java -jar target/hello-world.jar
(for helloworld-web-sparkjava, helloworld-web-vertx, helloworld-web-rapidoid, helloworld-web-ratpack, helloworld-web-javalin, helloworld-web-micronaut, helloworld-web-microprofile-hammock, helloworld-web-microprofile-kumuluzee, helloworld-web-microprofile-openliberty, helloworld-web-microprofile-helidon modules)mvn clean compile quarkus:dev
(for helloworld-web-quarkus module)mvn clean compile act:dev
(for helloworld-web-actframework module)mvn package
java -jar target/hello-world-exec.jar
(for helloworld-web-microprofile-tomee module)mvn package
java -jar target/hello-world-thorntail.jar
(for helloworld-web-microprofile-thorntail module)mvn package
java -jar target/hello-world-microbundle.jar
(for helloworld-web-microprofile-payara module) -
Access the deployed web application at: http://localhost:8080
See Habr (Russian)