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
1 answer

Embedded Jetty java.lang.NoClassDefFoundError: org/mortbay/log/Log

I'm trying to write a small embedded Jetty program for an app that is normally deployed to Tomcat. My app appears to initialize fine but then the Jetty server start throws an error related to logging. I have a log4j.properties file in my src…
Todd Chapman
  • 399
  • 3
  • 5
  • 13
5
votes
2 answers

Jetty 9 (embedded): Adding handlers during runtime

Is there any way to add handlers to a running embedded Jetty instance? We have migrated an old Jetty 6 based project to Jetty 9 and we need for our plugin system the possibility add and remove dynamically handlers... See the example below... Server…
Jens Peters
  • 2,075
  • 1
  • 22
  • 30
5
votes
3 answers

Jetty 9.0 The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved

I'm using Jetty 9 embedded. Maven Java 1.7 JSTL When I run my app in Eclipse and browse to my webpage which contains JSTL tags it works fine. When I bundle it in an executable jar and run from cmd prompt I get org.apache.jasper.JasperException:…
RossMcC
  • 51
  • 1
  • 2
5
votes
1 answer

Embedded jetty implementing HttpSessionListener

I am trying to implementing HttpSessionListener interface with embedded jetty with proxy servlet, I have registered SessionListener, but it is not getting invoked at all, here is the code, public class JettyProxy { public static void…
Srinivas
  • 553
  • 9
  • 21
5
votes
2 answers

LoggingFilter is ignored in Jersey and embedded Jetty

I'm trying to configure LoggingFilter for Jersey in an embedded Jetty setup. The glue code that is used is as follows: ServletContainer servletContainer = new ServletContainer(application); ServletHolder servletHolder = new…
nobeh
  • 9,784
  • 10
  • 49
  • 66
5
votes
2 answers

Embedded Jetty : how to use a .war that is included in the .jar from which Jetty starts?

I'm trying to generate a .jar containing a main() that would start Jetty. My problem is that I'd like the .war that Jetty loads to be included in the same .jar. I've been able to create the .jar containing the .war with : In the POM.xml :
electrotype
  • 8,342
  • 11
  • 59
  • 96
5
votes
1 answer

using embedded jetty to create a web interface

I am a newbie at web development, and at using embedded jetty. The source code presented below is developed using eclipse IDE. I have to start the jetty server programmtically, I do not have an option of starting it via the command line. It needs…
bhavs
  • 2,091
  • 8
  • 36
  • 66
4
votes
2 answers

Jetty 7 embedded configuration for websockets, servlets AND resource handlers

I am trying to configure embedded Jetty (7.6) to handle the WebSocketHandler, ServletContextHandler and ResourceHandler classes at the same time. I have tried using both HandlerCollection and HandlerList classes but I can't get all 3 parts to work. …
Taran
  • 12,822
  • 3
  • 43
  • 47
4
votes
1 answer

How to have integration tests setUp() manipulate HSQL data in an in-memory DB running in embedded Jetty container?

I am trying to run integration tests against a REST web service process that is started in an embedded jetty container within the maven integration test phase. That much is working. I want to configure the server to use an in-memory HSQL DB such…
4
votes
2 answers

best way to deploy jetty application--too many options?

I need to deploy a production version of a web application. So far, I've been testing it with mvn jetty:run. I've used actual jetty installations before, but they seem only necessary when you want to serve multiple wars on the same web server. In…
schmmd
  • 18,650
  • 16
  • 58
  • 102
4
votes
4 answers

Embedded jetty with json/xml response

I have embedded jetty server I want to create RESTful GET service which returns a pojo in XML/JSON format as response. can anyone give me one basic example how to write the handler for jetty? the example given only shows text type output.
rinku
  • 415
  • 2
  • 19
  • 29
4
votes
1 answer

Configure Spring Security on embedded Jetty in Spring

I have a Spring beans definition file, as below
ptomli
  • 11,730
  • 4
  • 40
  • 68
4
votes
1 answer

multiple instances of embedded jetty

I run an embedded jetty from eclipse using maven build configuration (jetty:run). The server starts properly: 2011-07-07 13:48:11.915:INFO::Started SelectChannelConnector@0.0.0.0:8080 STARTING [INFO] Started Jetty Server [INFO] Starting scanner at…
user833418
  • 41
  • 2
4
votes
1 answer

org.eclipse.jetty.util.ssl.SslContextFactory$Client ClassNotFoundException upgrading to Jetty Server 9.4.16

I have a working application that's been using jetty-server version 9.4.15.v20190215. Due to a vulnerability scan that found issues in jetty-server dependencies, I looked into upgrading my app to use jetty-server 9.4.19-v20190610, the latest release…
Cosimo
  • 2,846
  • 1
  • 24
  • 26
4
votes
1 answer

Vaadin 10/11 and embedded Jetty

I developed middle-size application on Vaadin 8.5.1. Jetty embedded 9.4.8 was used as Servlet container for Vaadin servlet. In Java code i initialize Jetty instance, create Vaadin servlet and attach it to Jetty. In Maven i use 'vaadin-maven-plugin'…
lanmaster
  • 330
  • 2
  • 16