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

Dojo Toolkit Maven Repository
Using  maven to build your project is a fantastic for managing your dependencies and avoiding having dependencies (and their dependencies) checked into your own svn.  The only fly in the ointment, is projects that don't publish maven artifacts, and the Ajax dojo toolkit has been one of these. Until now that is!

Read more...

jetty-test-servers
Jan and I have run across some annoying problems with test cases and test scoping within jetty recently and it has lead to some discussion on an idea that I have been kicking around for a while.  The problem was that we have some useful test cases which are in the form of jetty server configurations in the jetty module and maybe a couple of other module, but since they are test source they are not readily available for consumption in other modules.

Read more...

Jetty Deployed Around the World

The nice people at PaperCut were kind enough to talk about their usage of Jetty... and it isn't minor usage. 10's of thousands of servers in 60 countries. From small user populations to hundreds of thousands...

See their full posting here!

Read more...

JSR-315 Needs You II
Rajiv, the spec lead on JSR-315 has posted his views on the issue of flexible automatic configuration of web applications.  Despite vigorous arguments for flexibility (or perhaps because of them), I've not been able to make the case with those opposed to selective enabling of auto configuration....

Read more...

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...