2 min read

[Gentoo]Jetty with a .WAR file

Jetty with a .WAR file
In my company i currenly have a lot to do with Scala Lift. We're developing some stuff with it, but because it takes a lots of time to setup a Scala environment and we need quick show solution, we'll go with a .war file. The problem on my gentoo is, there is no jetty packages, so i searched for some overlays. I still got the java-overlay. With eix jetty, i'm searching for jetty:
* www-servers/jetty [1]
Available versions: (5) ~5.1.3-r1
 {doc source test}
 Homepage: http://www.mortbay.org/
 Description: A Lightweight Servlet Engine
The jetty version is outdate, so i'm downloading the jetty from the offical webpage:
wget -c http://dist.codehaus.org/jetty/jetty-6.1.26/jetty-6.1.26.zip
#Now unzip it
mkdir jetty && unzip jetty-6.1.26.zip -d jetty/
during the download i found a useful blog entry about jetty for debian.  How to deploy a .WAR file there. It's little bit like tomcat but just easier. Move you .WAR File to the $JETTY_HOME/webapps/ folder and start the Jetty Server.
java -jar start.jar
I found also on the overlays.gentoo an updated version of jetty, this can be found on the dustin overlay
layman -a dustin
eix-sync && eix jetty
* www-servers/jetty [1]
 Available versions: (6) ~6.1.24
 {elibc_FreeBSD}
 Homepage: http://jetty.codehaus.org/
 Description: Jetty Web Server; Java Servlet container
[1] "dustin" /var/lib/layman/dustin
I add the =www-servers/jetty-6.1.24 ~amd64 to /etc/portage/package.keywords, now install the jetty:
emerge -avq jetty
so far Akendo

Web Sources:

http://lifeofaprogrammergeek.blogspot.com/2010/06/deploying-war-in-jetty.html
http://overlays.gentoo.org/proj/java
http://gpo.zugaina.org/www-servers/jetty
http://www.gentoo.org/proj/en/java/