Questions tagged [embedded-jetty]

Jetty is a widely used web container (server) written in Java and produced by Eclipse.

Jetty is a widely used web container written in Java. Jetty has a slogan, "Don't deploy your application in Jetty, deploy Jetty in your application."

What this means is that as an alternative to bundling your application as a standard WAR to be deployed in Jetty, Jetty is designed to be a software component that can be instantiated and used in a Java program just like any POJO. Put another way, running Jetty in embedded mode means putting an HTTP module into your application, rather than putting your application into an HTTP server.

You can find extra information for Jetty at Codehaus.

1375 questions
4
votes
0 answers

Different behaviour when running Jetty embedded from IDE and command-line

I'm trying to serve static content from my applications classpath using embedded jetty and I have written the following code Server server = new Server(80); ResourceHandler resourceHandler = new…
Richo
  • 751
  • 7
  • 17
4
votes
2 answers

Webapp with embedded jetty giving exception

I am trying to maintain a java web app that is run standalone using embedded jetty, using Java 7 and Jetty 9.1.3. Everything runs except all of the links in one of the JSP pages. Each link on that page is supposed to fetch a png file or a text…
Jeff Bullard
  • 345
  • 1
  • 4
  • 14
4
votes
2 answers

Response Header too large - Jetty Embedded version 9

I'm getting an exception of "Response Header too large" when using Jetty, the exception is thrown at the Client and only when the size of the jsonValue is large (greater than 1500 bytes). If the jsonvalue is smaller, everything works fine. This is…
Cacho Santa
  • 6,846
  • 6
  • 41
  • 73
4
votes
1 answer

Jar/Class problems with Jetty WebSockets

I have a problem with WebSockets. Carried out by a Java development environment IntelliJ IDEA Community Edition 12.1.6 using Jetty 9.1.0 and Maven. I created two classes (code below). Class WsHandler: public class WsHandler extends WebSocketHandler…
Fedorov Alexandr
  • 43
  • 1
  • 2
  • 6
4
votes
3 answers

How to fix NPE during WebSocketFactory.upgrade() on embedded Jetty 8.1.12

I'm trying to run the Cometd websocket server within a self executing war which runs jetty 8.1.12 in embedded mode. I'm able to run all the other web apps this way, but for the websocket case I get this error: java.lang.NullPointerException at…
Jerico Sandhorn
  • 1,880
  • 1
  • 18
  • 24
4
votes
2 answers

NameNotFoundException Jetty 9 JNDI lookup

I need to implement JNDI for Jetty 9.0.3 web server for H2 database using C3p0 connection pooling, I've placed both H2 and C3p0 jars in lib/ext of JETTY-HOME directory and I've created a jetty-env.xml file in my WEB-INF. WEB-INF/jetty-env.xml
FiendFyre
  • 157
  • 3
  • 17
4
votes
0 answers

JRebel for IntelliJ and gradle

In my app I use multiple modules around 15 of them. I am unable to configure JRebel. Please help as I have referred many URL's all so confusing. I use IntelliJ, gradle and inbuilt jetty server. Also my app will be a jar acrhive. I manually…
user1703096
  • 115
  • 6
4
votes
1 answer

Jetty embedded and JSP compilation to 1.7?

Could i specify somehow the target version of vm for jsp compilation? (I need 1.7, not 1.5 which is by default). I have a WebAppContext, some filters in code on it etc. The webapp itself is an exploded war.. so no xml configuration is used as it was…
VirtualVoid
  • 1,005
  • 3
  • 17
  • 25
4
votes
1 answer

Jetty 8.1 flooding the log file with "Dispatched Failed" messages

We are using Jetty 8.1 as an embedded HTTP server. Under overload conditions the server sometimes starts flooding the log file with these messages: warn: java.util.concurrent.RejectedExecutionException warn: Dispatched Failed!…
mringe
  • 61
  • 2
4
votes
1 answer

jetty 9, websockets and closing websocket connection on server side

I have an application that uses a websocket server based on jetty 8. Everything is working great, and when the user refreshes the page, closes the page or move to another page the connection is closed and, on the server side the onClose event is…
Doua Beri
  • 10,612
  • 18
  • 89
  • 138
4
votes
1 answer

why is my jetty-deployed war looking for org.apache.juli.logging.LogFactory?

I am trying to deploy a war file from inside an embedded jetty server. I have the commons-logging jar in the WEB-INF/lib of my WAR. The init method of the JspServlet is looking for this org.apache.juli.logging.LogFactory class. I'm using Jetty…
user26270
  • 6,904
  • 13
  • 62
  • 94
4
votes
2 answers

Using Guice Servlet with Jetty to map paths to servlets without using a web.xml

I am struggling with getting Guice Servlet working to configure how Jetty serves web requests, in this simple case, for static pages. I have created a simple application that is supposed to map two different requests, one using GuiceServlet,…
neuronotic
  • 487
  • 7
  • 18
4
votes
1 answer

Loading war in embedded Jetty with setExtractWar(false) throws IllegalArgumentException

I'm using Jetty 8.1.9 as an API and manually deploying by adding a WebAppContext handler to the server. Server server = new Server(); WebAppContext webapp = new…
Shaun
  • 2,490
  • 6
  • 30
  • 39
4
votes
2 answers

Getting a 403 on root requests when using a ResourceHandler and custom handler in Jetty

In (embedded) Jetty, I'm trying to use a ResourceHandler to serve static files and a custom handler to respond to dynamic requests. Based on this page I have a setup that looks like this: public static void main(String[] args) throws Exception { …
ajselvig
  • 688
  • 1
  • 5
  • 12
4
votes
1 answer

return the number of connections on websocket server based on jetty 8

I have an application(java) based on a websocket server(embedded jetty 8) and I'm looking for a method to return the number of current connections. Is there such a thing? thanks
Doua Beri
  • 10,612
  • 18
  • 89
  • 138