Skip to main content


Showing posts from December, 2006

Run/Debug java webapp without packaging/deploying it with Jetty and under Maven2

Goals As the title mentioned, run(with maven2 command or in IDE)/debug(in IDE) java webapp without packaging the war file, installing/configuring any appserver like tomcat or deploying your code to anywhere. The practice will be "compile and run". Why Jetty ? Jetty is a lightweight, flexible and embeddable Java servlet container. It's so flexible that it can even start servicing a webapp directly from given classpath and a web.xml file without assembling them into a standard webapp. Step by step Introduce several dependencies into you pom file. This is required whatsoever if you want to run/debug jetty in IDE and make sure the servlet-api, xercesImpl and java tools.jar(if you want to run JSP) are in dependency list. <dependency> <groupId>jetty</groupId> <artifactId>org.mortbay.jetty</artifactId> <version>5.1.10</version> <scope>runtime</scope> </dependency> <dependency> <groupId>jetty</gr