# run Java web APP in Jetty



## mah454 (May 1, 2013)

Hello,

I installed jetty on FreeBSD 9.1. Now *I* want to run a Java web app (developed with Eclipse) in this service. The browser gives this this message: 

```
HTTP ERROR 500

Problem accessing /myapp/index.xhtml. Reason:

    org.primefaces.context.DefaultRequestContext.<init>(Ljavax/faces/context/FacesContext;)V
Caused by:

java.lang.NoSuchMethodError: org.primefaces.context.DefaultRequestContext.<init>(Ljavax/faces/context/FacesContext;)V
	at org.primefaces.context.PrimeFacesContext.<init>(PrimeFacesContext.java:16)
	at org.primefaces.context.PrimeFacesContextFactory.getFacesContext(PrimeFacesContextFactory.java:23)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:260)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:401)
	at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
	at org.mortbay.jetty.Server.handle(Server.java:326)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
	at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
	at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
```
I tested this application on Apache-Tomcat-6. I receive this message: 

```
HTTP Status 500 - Servlet execution threw an exception

type Exception report

message Servlet execution threw an exception

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet execution threw an exception
root cause

java.lang.NoSuchMethodError: org.primefaces.context.DefaultRequestContext.<init>(Ljavax/faces/context/FacesContext;)V
	org.primefaces.context.PrimeFacesContext.<init>(PrimeFacesContext.java:16)
	org.primefaces.context.PrimeFacesContextFactory.getFacesContext(PrimeFacesContextFactory.java:23)
	com.sun.faces.context.InjectionFacesContextFactory.getFacesContext(InjectionFacesContextFactory.java:121)
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:583)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.36 logs.

Apache Tomcat/6.0.36
```


----------

