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

How to get Javalin's Jetty http server to bind/listen on a specific address/port?

Using Javalin.create().port(portNumber) sets the listen port, but it's unclear how to set the listen/bind address.
karmakaze
  • 34,689
  • 1
  • 30
  • 32
5
votes
2 answers

How to create a spring boot app with ssl.enable=true and a non-secure "/health" end point

Is it possible to configure spring boot application ( Jetty ) to have at least one non-secure (non https) endpoint for a load balancer to perform health checks but have all other requests be forced to be secure? When setting the…
toddcscar
  • 1,115
  • 9
  • 12
5
votes
2 answers

How to use CDI into JAX-RS client

I have searched a while on SO and official documentation but I cannot found a way to use directly CDI injection into a JAX-RS client. I retrieve a client using the builder method and I want to register a WriterInterceptor (or any filter like…
Nicolas Henneaux
  • 11,507
  • 11
  • 57
  • 82
5
votes
0 answers

How to limit number of allowed active connections in Jetty

Here, I am trying to reject the request at the level of jetty server before reaching to servlet. Since as per below configuration Thread Pool has 6 minimum and 10 maximum parallel execution threads and 10 requests can be queued in thread pool where…
5
votes
1 answer

Jetty: default servlet context path

I need to set Servlet (only servlet not handler because of some reasons) to work with files outside war. Here https://stackoverflow.com/a/28735121/5057736 I found the following solution: Server server = new Server(8080); ServletContextHandler ctx =…
Pavel_K
  • 10,748
  • 13
  • 73
  • 186
5
votes
1 answer

WebSocket over SSL in embedded Jetty 9

For this question I have prepared a test project WssEmbedded, which listens for incoming WebSocket connections at localhost:8080 and localhost:8443. In the MyHandler class I create 2 connectors for this purpose: public class MyHandler extends…
Alexander Farber
  • 21,519
  • 75
  • 241
  • 416
5
votes
0 answers

Java Spark and Jetty User Defined Config file and parameters

I'm trying to figure out how I can set up a config file for Java Spark (the microframework) and its implementation of Jetty. I've managed to deploy the full application as a single .jar file with its dependencies and I quite like that option, but if…
edumike
  • 3,149
  • 7
  • 27
  • 33
5
votes
5 answers

JSP compilation error after upgrade to jetty-9.3.3

I have a webapp application which was running on embedded Jetty-7.6.8 (jdk-6), but due to Diffie-Hellman error on the browser we decided to move to newer version of Jetty. So, we moved to Jetty-9.3.3. As Jetty-9.x needs jdk-8, I upgraded jdk also.…
devd
  • 370
  • 10
  • 28
5
votes
3 answers

How to change Jetty settings through SparkJava? / Form too Large Exception / org.eclipse.jetty.server.Request.maxFormContentSize

I'm using SparkJava 2.2 which is using Jetty 9.0.2. I'm getting "Form too large" exception which is thrown by Jetty. I already know how to solve this problem if I was using Jetty directly: Form too Large…
Patrycja K
  • 731
  • 7
  • 14
5
votes
2 answers

How to run hawt.io in spring boot application with embedded tomcat

I would like to add hawt.io as an embedded component to my spring boot 'fat jar' application which has an embedded tomcat server. How can I do this? How could I deploy the hawt.io war file? UPDATE: I added the…
ABX
  • 1,173
  • 2
  • 22
  • 39
5
votes
1 answer

Jetty with SSL in Spring Boot 1.2.1

How should I configure Jetty with SSL connector in Spring Boot 1.2.x ? The following configuration is working for Spring boot 1.1.6 but gives 'SslSocketConnector cannot be resolved to a type' error for the version…
Kumar Sambhav
  • 7,503
  • 15
  • 63
  • 86
5
votes
1 answer

How to initialize a web app?

My Web App will be deployed as a WAR package in a Jetty instance. It needs to perform a lot of caching before serving requests. How do I call the caching method before anything else? is the a static void main() in the web app standard?
Igor Gatis
  • 4,648
  • 10
  • 43
  • 66
5
votes
1 answer

Jetty + Programatic SPNEGO configuration

I am trying to configure an embedded Jetty webserver to use SPNEGO programatically (without xml). I am trying to convert this: http://www.eclipse.org/jetty/documentation/current/spnego-support.html to a non-xml based configuration. Here is my…
Cheetah
  • 13,785
  • 31
  • 106
  • 190
5
votes
1 answer

Unable to configure Swagger with embedded jetty programmatically

I have been trying to use swagger to document my jaxrs-resteasy service. I want to configure this programmatically in a embedded jetty server setting. Here are my Resource,Server and Application classes. I can access http://127.0.0.1:9091/rest/hello…
Anusha Pachunuri
  • 1,389
  • 4
  • 18
  • 39
5
votes
4 answers

create a executable jar using maven and jetty

I want to start my application using jetty, so I have added the dependency mentioned below. and when I run the main method Jetty starts successfully.(I am working on a struts2+spring3+ hibernate maven project, i am able to deploy it in tomcat…
jos
  • 1,082
  • 5
  • 19
  • 45