The Ajax and Comet Server
Webtide, the Java experts behind Jetty
     
 
Whitepapers and Presentations



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.

Source: maven-archetype-ActiveMQ.zip
Artifact ID: maven-archetype-ActiveMQ
Version: 5.0.0
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.

Source: maven-archetype-DOJO.zip
Artifact ID: maven-archetype-DOJO
Version: 1.0.2
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.

Source: maven-archetype-DWR.zip
Artifact ID: maven-archetype-DWR
Version: 2.0.2
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.

Source: maven-archetype-JSF.zip
Artifact ID: maven-archetype-JSF
Version: 1.2_07
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.

Source: maven-archetype-SiteMesh.zip
Artifact ID: maven-archetype-SiteMesh
Version: 2.3
Spring This archetype allows you to generate a template for a web application that uses Spring. The sample webapp displays "Hello world!".

Source: maven-archetype-Spring.zip
Artifact ID: maven-archetype-Spring
Version: 2.5
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.

Source: maven-archetype-SpringJpa.zip
Artifact ID: maven-archetype-SpringJpa
Version: spring-2.5, hibernate-3.2.4.sp1
Contributed by: Ermanno Franco, copyright 2006
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.

Source: maven-archetype-Struts.zip
Artifact ID: maven-archetype-Struts
Version: struts2-2.0.11, struts-taglib-1.3.9
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.

Source: maven-archetype-Tapestry.zip
Artifact ID: maven-archetype-Tapestry
Version: 4.1.3
For version 5.0.5, you can refer to this archetype.
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.

Source: maven-archetype-WebWork.zip
Artifact ID: maven-archetype-WebWork
Version: 2.2.6
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!".

Source: maven-archetype-Wicket.zip
Artifact ID: maven-archetype-Wicket
Version: 1.2.6


 
     
News & Blogs

JavaOne
Hope to see you there. Webtide has a booth #1224-4!

Read more...

Jetty Runner
If you're looking for a fast and easy way to run your webapp, without needing to install and administer a Jetty distro, then look no further, the Jetty Runner is here! The idea of the Jetty Runner is extremely simple - run a webapp from the command line using a single jar and as much default configuration as possible:
  java -jar jetty-runner.jar my.war
Voila! Jetty will start on port 8080 and deploy the my.war webapp.

Read more...

Patterns for Servlet 3.0 suspend usage.
This blog presents 5 patterns of suspend usage for servlet-3.0, which can help explain the generic cases, provide a template for specific implementations and/or be the basis of frameworks to help developers.

Read more...

JSR-315 Needs YOU!
The expert group for JSR 315 (servlet-3.0) has come to a bit of an impasse regarding some new features for auto discovery of servlets and filters.   Some members of the EG have some security/flexibility concerns regarding these features, but others do not think the concerns  significant enough to warrant additional complexity in configuration options.
In order to resolve this impasse, the EG has decided to solicit more community feedback. So this is my biased blog soliciting that feedback.

Read more...

Use-Cases for Async Servlets
Pre-release 0 of Jetty 7.0.0 is now available and includes a preview of the proposed Servlet 3.0 API for asynchronous servlets.  This  blog looks at 4 cool things you can do with asynchronous servlets and how they can be implemented using the proposed API.

Read more...

Jetty 7.0.0pre0 released!
The trunk of jetty has undergone some substantial changes over the last couple of weeks.  In addition to jetty 7 now requiring a minimum version of jdk 1.5 and the default inclusion of the early servlet 3.0 spec, there have been a number of structural changes a bit more near and dear to my heart.  It leverages a bit more maven2!

Read more...