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
19
votes
2 answers

In the Jetty server how can I obtain the client certificate used when client authentication is required?

It is very easy to set up an embedded Jetty server that requests client authentication: One just needs to add the statement SslContextFactory.setNeedClientAuth(true); to the ssl context when configuring the server. Any client that has its…
Brian Reinhold
  • 2,313
  • 3
  • 27
  • 46
19
votes
1 answer

Configuring a spring-boot application using web.xml

I'm bootifying an existing Spring Web application so the generated war file embed a Jetty web server. I want to stick to the existing configuration as much as I can in order to limit the regressions. Here is the existing web.xml:
18
votes
6 answers

How do I limit the number of connections Jetty will accept?

I'm running Jetty 7.2.2 and want to limit the number of connections it will handle, such that when it reaches a limit (eg 5000), it will start refusing connections. Unfortunately, all the Connectors appear to just go ahead and accept incoming…
BigBen
  • 1,162
  • 2
  • 11
  • 22
17
votes
2 answers

Is there a good way to use maven to run an executable jar?

I have a multimodule maven project, and one of the modules is for distribution. Project \ | moduleA \ | moduleB \ | ... | dist-module \ The distribution contains an executable jar that I'd like to easily execute. However, to execute it I have to…
Shaun
  • 2,490
  • 6
  • 30
  • 39
16
votes
10 answers

cannot load JSTL taglib within embedded Jetty server

I am writing a web application that runs within an embedded Jetty instance. When I attempt to execute a JSTL statement, I receive the following exception: org.apache.jasper.JasperException: /index.jsp(1,63) PWC6188: The absolute uri:…
user260513
16
votes
1 answer

Serving static files from alternate path in embedded Jetty

I'm trying to create an embedded jetty server with both a custom servlet that serves some dynamic data, and default servlet that will serve some images. I have the custom servlet working, but I can't figure out how to add a default servlet to serve…
user3034643
  • 163
  • 1
  • 1
  • 6
16
votes
2 answers

How to embed Jetty and Jersey into my Java application

So I'm trying to embed jetty into my web application so that if I package it as a jar someone can just run the jar file without having to worry about configuring a server. However, I'm having some problems setting up my main class so that jetty can…
user2494770
15
votes
5 answers

What jetty jar should I use?

I'd like to create an application using the embedded version of Jetty. Unfortunately, I can't find any information on what jar files I would need to do that. There are several in the maven repository…
Ben McCann
  • 18,548
  • 25
  • 83
  • 101
14
votes
3 answers

Embedded Jetty - IllegalStateException: No SessionManager

I've found plenty of references to this issue on google but no answers. I'm using the latest version of jetty (8.1.2.v20120308) and I can't seem to get an embedded servlet to be able to use sessions. The example is in scala of course, but it…
Michael Fortin
  • 171
  • 1
  • 1
  • 6
14
votes
2 answers

How can I serve a particular classpath resource at a given address using embedded jetty?

I'm looking to expose a clientacesspolicy.xml file from an embedded jetty server. My current attempt looks like this: ContextHandler capHandler = new…
Andy
  • 3,596
  • 8
  • 34
  • 33
14
votes
5 answers

java.lang.ClassNotFoundException: jakarta.servlet.http.HttpSessionContext with Spring Boot 3 and Jetty server

I community, I'm trying to run a small example with Spring boot 3 and Jetty server before upgrading the production code but I'm getting this error java.lang.ClassNotFoundException: jakarta.servlet.http.HttpSessionContext and the services does not…
red
  • 606
  • 10
  • 17
14
votes
2 answers

Specifying the Jetty port in SBT 0.10

I need to run the embedded Jetty on port different to the default 8080, using SBT 0.10 The question was answered here for SBT 0.7 - In which file do I need to add an override for the jetty port when running a lift webapp in dev mode from sbt?. I can…
iandebeer
  • 227
  • 2
  • 8
14
votes
3 answers

Missing JSP support in Jetty, or confusing log message?

Launching jetty by calling the API in 6.1.24. The JSP 2.1 component is on the classpath. org.mortbay.jetty:jsp-2.1-jetty:jar:6.1.24:compile But the log says: 2010-08-19 08:16:19.443:INFO::NO JSP Support for /basis_ws, did not find…
bmargulies
  • 97,814
  • 39
  • 186
  • 310
14
votes
2 answers

How to embed i-jetty server into android application?

Hi: I want to integrate i-jetty into an Android application and not the other way around. Has anyone included i-jetty before and got it to run under Android 2.1 or 2.2?
Sney
  • 2,486
  • 4
  • 32
  • 48
14
votes
3 answers

Spark web framework logging requests and responses

I'm using the Spark web framework to develop a REST API. Is there a way to automatically log all incoming requests and outgoing responses (query params, headers, status codes, etc) or do I need to manually add logging for each one of the…
Henrique
  • 4,921
  • 6
  • 36
  • 61
1
2
3
91 92