Reputation: 443
How can I configure a Tapestry5 project to run standalone (via java -jar) with embedded Jetty?
I'm looking for a short "recipe" regarding Tapestry5, Jetty, configuration of servlets/ handlers/ whatever is needed to connect the dots...
I've seen a few dots: How to Create an Executable War, Configuring Tapestry (ref Tapestry as servlet filter)
Edit: I'm thinking about a standalone running webapp due to server circumstances. It doesn't have to be embedded Jetty, but I can't rely on a stable appserver. Still looking for a recipe, though, so I don't spend much time on dead ends...
Also, I'd like for Jenkins (Hudson) to be able to stop and start the server automatically when deploying updates - I don't know if that influences what I can do with Jetty, f.ex.
Upvotes: 0
Views: 1399
Reputation: 443
I did some digging, and this is the short recipe I basically ended up following:
stopKey
and stopPort
attribute to Maven Jetty plugin configurationjetty:stop
and then clean install
mvn jetty:run &
Voila - my Java app is up and running with automatically updated code, without any appserver.
Upvotes: 0
Reputation: 11
https://github.com/ccordenier/tapestry5-hotel-booking/ <-- Check its maven build
http://tapestry.zones.apache.org:8180/tapestry5-hotel-booking/signin
Upvotes: 1
Reputation: 1332
Well, i believe this is a general "how to run a war question". Assuming you indeed have a war, you can use jetty or winstone to "run" it - see :
http://winstone.sourceforge.net
and
http://www.enavigo.com/2008/08/29/deploying-a-web-application-to-jetty/
In the first case, you can directly do
java -jar winstone.jar --warfile=<warfile>
Upvotes: 3