Webtide

The Java experts behind Jetty

Skip to the navigational footer.

Resources and Downloads

Maven Archetypes for Web Applications

This page contains Maven archetypes to help you quickly and easily get started on a web project that uses the Jetty plugin. Each archetype allows you to generate a template for your project based on the included sample web application. (This supposes that Maven 2.x is already installed in your system.)

Getting and building the archetype locally:

Download the archetype source from the list below. Unzip and navigate to the root folder. Install the archetype locally with the command mvn install.

Creating a template for a web application:

Execute the following command to create the project template:

mvn archetype:create \
-DarchetypeGroupId=com.webtide \
-DarchetypeArtifactId=<artifactId> \
-DarchetypeVersion=1.0 \
-DgroupId=<my.groupid> \
-DartifactId=<my-artifactId>

<my.groupId> and <my-artifactId> pertains to the information about the new project you want to create. For the <artifactId>, refer to the list below.

Running the sample web application:

Execute the command mvn jetty:run. Point your browser to http://localhost:8080 *.

Available archetypes:

ActiveMQ

This archetype allows you to generate a template for a web application that uses ActiveMQ. The sample webapp allows a user to type in and send a message which will then be added to a Message Log.

DOJO

This archetype allows you to generate a template for a web application that uses DOJO. The sample webapp displays "Hello World!" that the user may fade out or fade in.

cometd

This archetype allows you to generate a template for a web application that uses cometd using Jetty's ContinuationCometdServlet. The sample webapp echoes messages being sent to the server back to the client.

  • Source: maven-archetype-cometd.zip
  • Artifact ID: maven-archetype-cometd
  • Version: cometd-api: 0.9.20071211, cometd-bayeux: 6.1.7, jetty: 6.1.7

DWR

This archetype allows you to generate a template for a web application that uses DWR. The sample webapp allows the user to enter his name to display a customized "Hello World" greeting.

JSF

This archetype allows you to generate a template for a web application that uses JSF. The sample webapp allows the user to enter his name to display a customized "Hello" greeting.

SiteMesh

This archetype allows you to generate a template for a web application that uses SiteMesh. The sample webapp displays "Hello world!" and the current date.

Spring

This archetype allows you to generate a template for a web application that uses Spring. The sample webapp displays "Hello world!".

Spring JPA

This archetype allows you to generate a template for a web application that uses Spring and Hibernate JPA. The sample webapp displays "Hello world!" and allows you to modify a list of people's names and professions.

The webapp requires a database to be running. The sample uses HSQL. The sample webapp is capable of running the database by typing: mvn install. Then, in another window, run the webapp by using the command: mvn jetty:run. To try the sample webapp, point your browser to http://localhost:8080.

Struts

This archetype allows you to generate a template for a web application that uses Struts. The sample webapp allows the user to enter his name to display a customized "Hello" greeting.

Tapestry

This archetype allows you to generate a template for a web application that uses Tapestry. The sample webapp displays "Hello world!" and the current date.

To view the sample webapp, point your browser to http://localhost:8080/app.

WebWork

This archetype allows you to generate a template for a web application that uses WebWork. The sample webapp allows the user to enter his name to display a customized "Hello" greeting.

Wicket

This archetype allows you to generate a template for a web application that uses Wicket. The sample webapp displays its own version of "Hello World!".