Questions tagged [jetty]
Eclipse Jetty is a widely-used async Java-based HTTP server and servlet engine supporting HTTP/1.0, HTTP/1.1, HTTP/2, and WebSocket protocols.
7,051
questions
0
votes
0
answers
7
views
Run Smallrye graphql as a servlet inside embedded jetty
I want to extend my existing embedded jetty-server with graphql functionality. After some readings the smallrye implementation seems the best fit for me.
I found the smallrye (https://github.com/...
0
votes
0
answers
10
views
Trying to customize 404 error page from Camel Jetty
I'm working on an osgi package with Apache Camel and Jetty and trying to customize the 404 error page but can't find a way
Reading on the internet indicates that it has to be done using an Error ...
0
votes
1
answer
34
views
Why does spring-boot-starter-jetty depend on tomcat-embed-el?
We are using Spring-Boot (2.7.x) with Jetty. Our dependency scanner told us, that we still have Tomcat dependencies in our dependency tree.
When looking at the POM for spring-boot-starter-jetty 2.7.1 ...
0
votes
0
answers
29
views
Jetty + rest + cdi with maven
Simple question; can anyone point me to a pom.xml which has Jetty 10 or 11 working with REST and CDI?
All my googling only finds me examples with old jetty versions.
0
votes
1
answer
11
views
Adjusting logging programmatically in Jetty 11
Jetty changed how logging works between 9 and 10/11. It used to be possible to pass a logger via org.eclipse.jetty.util.log.Log.setLog(), which has now been deprecated. It appears to be non-functional ...
0
votes
0
answers
34
views
Embedded Jetty 10 With Vaadin 14
I am moving a Vaadin 8 application with an embedded Jetty server to Vaadin 14. In my new version I am compiling from and to Java 11. I have the application working with Vaadin 14 and Jetty 9 but I ...
0
votes
1
answer
81
views
Error replacing tomcat with jetty in a springboot application
I am trying to remove tomcat from my springboot application and add jetty instead. I removed tomcat dependency from my application and added jetty but it is not working.
My pom.xml -
<dependencies&...
0
votes
1
answer
20
views
Testing application using a stub server in jetty
I'm writing tests for an application that accesses web services over http. I'd like to create a stub server where I can verify the request that came from the client app and send a stub response. I'm ...
0
votes
1
answer
17
views
Directory listing with embedded Jetty and Spring Boot
I try to enable directory listing in Spring Boot v2.7.0 with embedded Jetty by implementing a WebServerFactoryCustomizer:
public class MyJettyWebServerCustomizer implements WebServerFactoryCustomizer&...
-1
votes
0
answers
14
views
Upgrading jetty-server from 8.1.10 -9.4.46 [duplicate]
I am getting more error while updating jetty-server version from 8.1.10 -9.4.46..
-->cannot resolve symbol SslSelectChannelConnector
-->cannot resolve symbol SocketConnector..
Not importing org....
1
vote
2
answers
46
views
Jetty is not sending the Content-Length header
I have a servlet in embedded Jetty that provides downloads for certain files.
The code I use is the following:
try{
File file = new File(filePath);
response.setContentLengthLong(file.length());...
0
votes
1
answer
37
views
NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
I have used jetty 10 and java 11. Also added jsp module and its dependencies. Still while running jetty i'm getting below error. I have used custom classLoader.
2022-06-09 11:45:08.094:INFO :oejs....
0
votes
1
answer
15
views
X509 client-certificate not found in Jetty 11
After a recent upgrade from Jetty 10 to Jetty 11 we have a problem with connections that use a client certificate. The client certificate used to be available in a request attribute "javax....
0
votes
0
answers
36
views
Looking for a simple, xml-oriented way of connecting Spring-Integration http inbound gateways to Jetty
I'm looking for a lighter way of unit-testing my spring-integration-http gateways than by using SpringBootTest. I'd like to see if I can attach my spring-integration handlers to Jetty directly.
As a ...
0
votes
1
answer
23
views
How to using Jetty source code start web app
I have the following problem after executing the Main class directly
ERROR : No enabled jetty modules found!
INFO : ${jetty.home} = /Users/zhangsan/git_repo/servlet-container/jetty.project
INFO : ${...
0
votes
0
answers
29
views
Jenkins running as a service restarts by itself after upgrade from 2.303.2 to 2.319.3
I upgraded Jenkins (running as a service) from version 2.235.5 to 2.303.2 (by just replacing .war file and restarting the service), which seemed to work pretty stable.
Before doing it, I upgraded Java ...
0
votes
0
answers
25
views
How to set REACT_APP_ROUTER_BASE for react app when configured with Jetty server
I have created a test react project and were trying to host it on Jetty server. My pom.xml looks like this :
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://...
0
votes
0
answers
32
views
Change Spring Boot server from Tomcat to Jetty jar scanner problem
I tried to use Firebase Java Admin SDK in Spring Boot environment.
When configuration is Tomcat, everything works fine, here is the pom.xml content.
<dependencies>
<dependency>
...
0
votes
1
answer
27
views
Strange jetty warning "java.lang.IllegalStateException: Committed" on redirecting, how to fix it?
I have a custom Jetty redirect Handler:
object RedirectHandler extends HandlerWrapper {
override def handle(
target: String,
baseRequest: Request,
request: ...
1
vote
0
answers
53
views
JVM fails to exit with no non-daemon threads
One of our embedded jetty applications doesn't exit even though there are no non-daemon threads according to the thread dump:
Threads class SMR info:
_java_thread_list=0x00007fede8001c60, length=15, ...
1
vote
1
answer
42
views
How to register AnnotationConfigWebApplicationContext in JettyHttpContainerFactory?
I am trying to integrate the Spring DI container using the jersey-container-jetty-http dependency.
Here is my code:
var applicationContext = new AnnotationConfigWebApplicationContext();
...
0
votes
0
answers
22
views
Jetty: get connector used for request in servlet
i know, that this question was asked before(long time ago...). So that's why I'm bringing it up again.
Maven pom.xml ...
<dependency>
<groupId>org.eclipse.jetty</groupId>
<...
1
vote
0
answers
17
views
Springboot application used TomcatEmbeddedServletContainerFactory vs JettyEmbeddedServletContainerFactory for uploading large(2 Gb) file
My Springboot application used TomcatEmbeddedServletContainerFactory to upload large(2GB) file,now tomcat dependency we are not using, but currently using jetty dependency. So using ...
0
votes
1
answer
25
views
Processing of proxy layer fails using ProxyConnectionFactory in embedded Jetty 10.0.9
I am trying to implement a Jetty based proxy using ProxyConnectionFactory
following the usage documented in the Eclipse Jetty Programming Guide. Why do
I get garbled information fed to my handle ...
0
votes
0
answers
24
views
Is it possible to use ktor with Jetty version 10 or 11?
I'm working on porting a project which uses KTor from Jetty 9 to Jetty 11.
When I look at the Maven dependency:tree output, I see that the KTor ktor-server-jetty package depends on Jetty 9 libraries:
[...
0
votes
0
answers
18
views
How to manage DTD URLs and avoid fetching DTD URL references to be fetched at runtime?
I have software running at different sites for over a decade now. That software uses, among other libraries, Hibernate and Jetty. Both of those have XML configuration files that have a DOCTYPE ...
2
votes
1
answer
52
views
Cannot Set CORS with Blazegraph (localhost:9999, Jetty) for Access from Another Port (localhost:600, http-server)
I've been running MediaWiki with Wikibase, the Wikidata Query Service (GitHub), and the Wikidata Query Service GUI on a remote Ubuntu server. I am tunneling into that server in order to access things ...
-1
votes
1
answer
64
views
Jetty: How do I protect unpack war file [closed]
I developed web that deploy ROOT.war through jetty(windows10)
and I will deploy that to my client
but I don't want to who modify my unpacked war file.
and I want to protect my unpacked war file
...
0
votes
1
answer
27
views
embedded Jetty start without certificate and when cert available load it
I have embedded Jetty server in my Java code. I am loading a SSL certificate by using SslContextFactory class. My problem is when Jetty server starts that time .jks file is not present at the ...
0
votes
1
answer
40
views
Secure API JAX-RS API with ssl certificate over Jetty Server
I have Jax-RS REST API with Jetty Server in my Java 8 application. I am new to securing the REST API.
I have .pem file (certificate) in some path.
I want to use this certificate to validate the ...
0
votes
1
answer
163
views
Jetty17 --add-opens option does not work, java.lang.IllegalAccessError
I use Java 17 with Jetty 11.0.9. I started Jetty with the following command
java --add-opens=java.base/java.lang=ALL-UNNAMED -jar start.jar
Then I am facing exception followings.
2022-05-06 16:40:45....
0
votes
1
answer
40
views
What is best practise when creating new threads when inside a servlet container?
Today I was looking at some web app code that used Executors.newSingleThreadScheduledExecutor() on a per request basis to poll a REST API for a final status (think COMPLETE, FAILED, etc.). Knowing ...
0
votes
1
answer
32
views
How do I get config paramerters from my web.xml in Jersey?
I have been trying to get parameters from my web.xml file from within my Jakarta JAX-RS resource. My web.xml is as follows:
<web-app>
<servlet>
<servlet-name>Jersey REST ...
1
vote
1
answer
76
views
Jetty - httponly cookie not being saved in browser in embedded jetty 11
In my web app i am setting response cookies this way:
Cookie testCookie = new Cookie("test", "mycookie");
testCookie.setHttpOnly(true);
testCookie.setPath("/");
...
1
vote
1
answer
39
views
Serve html page for video streaming in embedded Jetty
I have an embedded jetty application that has various endpoints, one of them is /stream/fileId and another one is /streamWithHTML/fileId.
The first one gets a file with the specified id from ...
0
votes
1
answer
84
views
Zookeeper java.lang.NoClassDefFoundError: org/eclipse/jetty/server/Connector
I am getting the below error when starting Apache HBase with Zookeeper on my mac. I am using openjdk11.
./start-hbase.sh
************* WARN [main] admin.AdminServerFactory: Unable to load jetty, ...
0
votes
1
answer
47
views
Vaadin 22 Starter not working in a standalone instance of Jetty v9
I have cloned from https://github.com/vaadin/skeleton-starter-flow/tree/v22
I produce a .war file (project-base-1.0-SNAPSHOT.war) in the target directory using,
mvn package -Pproduction
I pop the .war ...
0
votes
1
answer
22
views
Jetty Request attributes not propagated across services
Service A forwards requests to Service 2 using AsyncProxyServlet but the attributes set in the request by service A is not available in the request once it reaches Service B. Are servlet request ...
0
votes
1
answer
21
views
how to add 'host_name' extension for SNI in java (using jetty)
i am trying in every way to add the SNI to my client (jetty 11.0.9). The server requires me to send host_name, but there is no way with jetty. can anyone do it?
0
votes
1
answer
39
views
How to control log rotation for Jetty Runner web apps
I'm using jetty-runner.jar version 9.4.28.v20200408. When I run java jar command, I got this output:
Usage: java [-Djetty.home=dir] -jar jetty-runner.jar [--help|--version] [ server opts] [[ context ...
0
votes
0
answers
34
views
Java Slack API: use of jetty libraries
I'm following this Java example to post a message to a slack channel chat.postMessage/code. It uses these 3 lines referencing SlackAppServer:
import com.slack.api.bolt.jetty.SlackAppServer;
var ...
1
vote
1
answer
119
views
Java + Maven for org.eclipse.jetty Error: failed to access class org.eclipse.jetty.util.ArrayTernaryTrie
I'm attempting to add the following jetty dependencies to an existing Java project:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-...
1
vote
1
answer
44
views
Embedded Jetty no filter named cross-origin
I am trying to implement cors in a embedded jetty server. I feel lost right now with this exception.
java.lang.IllegalStateException: No filter named cross-origin
at org.eclipse.jetty.servlet....
1
vote
1
answer
16
views
How to add multiple bases in /etc/default/jetty
I am trying to add multiple jetty bases to jetty server. Documentation says it is possible without providing the information on how to do it.
So in /etc/default/jetty file with single jetty base is ...
0
votes
0
answers
39
views
Embedded Jersey 3 with Jetty into existing Application
i am trying to embed a HTTP-Server into an existing java Application. My goal is to create a small rest API as an interface to send commands to the server application it runs in.
I planned using ...
0
votes
1
answer
57
views
how to enable Jetty debug log in 9.4.40
I am using Jetty 9.4.40 and for jetty debug logs I have added
1. -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog -
Dorg.eclipse.jetty.LEVEL=DEBUG
...
0
votes
0
answers
45
views
Encrypting Keystore Password in Jetty 10
According to the jetty docs: https://www.eclipse.org/jetty/documentation/jetty-10/operations-guide/index.html#og-password if the keystore is password protected, I need to define that password in a ...
0
votes
1
answer
50
views
Where is the best location for the keystore in Jetty 10
I'm setting up a jetty application that needs to communicate with a sql server. I have successfully generated the keystore, but I'm not sure where the best location is to actually put the file. The ...
1
vote
1
answer
55
views
Java process has physical memory larger than committed memory from jcmd
I have a server java app use jetty websocket server and bittorrent-tracker for websocket client
The issue is when I run with many client it has a memory leak in my java app
I check the memory usage of ...
0
votes
1
answer
41
views
Unable to delete jetty working directory before jetty starts or creates it's working directory
I am kind of running into this interesting problem. I wanted to delete the jetty working directory before jetty restarts next time. The application has 2 war files and this is implemented using embed ...