Eclipse RCP plugin + embedded Jetty + JSF

Take a look at setting a context in jetty. You can define it before start your server. public class OneWebApp { public static void main(String[] args) throws Exception { String jetty_home = System.getProperty(“jetty.home”,”..”); Server server = new Server(8080); WebAppContext webapp = new WebAppContext(); webapp.setContextPath(“https://stackoverflow.com/”); webapp.setWar(jetty_home+”/webapps/test.war”); server.setHandler(webapp); server.start(); server.join(); } }

Jetty Run War Using only command line

Use the jetty runner. java -jar jetty-runner.jar my.war With Maven, you can install by adding to your pom.xml: <build> … <plugins> … <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.3</version> <executions> <execution> <phase>package</phase> <goals><goal>copy</goal></goals> <configuration> <artifactItems> <artifactItem> <groupId>org.mortbay.jetty</groupId> <artifactId>jetty-runner</artifactId> <version>7.5.4.v20111024</version> <destFileName>jetty-runner.jar</destFileName> </artifactItem> </artifactItems> </configuration> </execution> </executions> </plugin> </plugins> </build> Run: mvn package And use as: java -jar target/dependency/jetty-runner.jar target/*.war … Read more

Jetty, Tomcat, Nginx, Geronimo, Glassfish: I’m confused

Jetty and Tomcat are web-containers, while Geronimo, Glassfish and JBoss support the whole J2EE stack (more or less). And, tataaa, they use/include Tomcat or Jetty for web-containers. The most important part of a fullblown J2EE server besides the web-container used to be the EJB-container allowing for deployment of EJBs, having them run in a transactional … Read more

java.io.IOException: Broken pipe

The most common reason I’ve had for a “broken pipe” is that one machine (of a pair communicating via socket) has shut down its end of the socket before communication was complete. About half of those were because the program communicating on that socket had terminated. If the program sending bytes sends them out and … Read more

How to control VM arguments for maven-jetty-plugin?

The enviroment variable MAVEN_OPTS is the answer. The string content of MAVEN_OPTS is passed to JVM (java.exe). Linux: in shell type export MAVEN_OPTS=…. Windows: in shell (cmd.exe) type set MAVEN_OPTS=… For example: on Windows set MAVEN_OPTS=”-Xmx1024m” sets the heap size of the Maven process to 1024mb. Update (01.04.2013): Pass it directly to Jetty. Matthew Farwell … Read more