jetty-9

No cipher suites in common in Jetty 9 SSL Configuration

廉价感情. 提交于 2019-12-06 11:53:13
问题 I have spent the better part of the day on this and so far have been unable to get Jetty 9 configured to serve over HTTPS correctly. This is only for development purposes so I have generated a keystore file that I am attempting to use with Jetty. I am generating the certificate like this: keytool -keystore keystore -alias jetty -genkey -keyalg RSA This is from the Jetty instructions at https://www.eclipse.org/jetty/documentation/current/configuring-ssl.html. Output from mvn -X jetty:run when

Embedded Jetty 9 handle one request at a time

筅森魡賤 提交于 2019-12-06 08:31:34
问题 I am using jetty 9 in embedded mode and even though i have given a threadpool of 500 the server still just handle one request at a time. What am i missing ? JAVA CODE: // here i expect all thread name log to print instantaneously but they print one by one public class Main { public static void main(String[] arg) throws Exception { ExecutorThreadPool executorThreadPool = new ExecutorThreadPool(Executors.newFixedThreadPool(500)); final Server server = new Server(executorThreadPool); final

Camel-Jetty http proxy + large response data casue issue: Buffering capacity exceeded

谁都会走 提交于 2019-12-05 23:46:24
jetty expert, I got error when getting back large data via camel-jetty as http proxy, any experience/idea/suggestion are welcome, thanks in advance. RouteBuilder code: from("servlet:balancer?matchOnUriPrefix=true") .to("jetty:http://vm-a38e-8f19.nam.nsroot.net:19999/balancer/?" + "bridgeEndpoint=true" + "&disableStreamCache=true" + "&throwExceptionOnFailure=false" + "&bufferSize=1024000000" + "&inboundBufferSize=1024000000" + "&outboundBufferSize=1024000000" + "&eagerCheckContentAvailable=true" + "&httpClient.responseBufferSize=1024000000&responseBufferSize=1024000000&chunked=false") ENV: <jdk

Unstable behavior with Jackson Json and @JsonAnySetter

丶灬走出姿态 提交于 2019-12-05 20:14:23
I am working on a Java web project using Jackson for Json serialization and deserializtion. I am using Jetty as a web server I am trying to deserialize a generated class at build time: /** *Generated class at compile time **/ @JsonInclude(NON_NULL) public class SamplePayloadContent extends AbstractSamplePayload { @NotNull @JsonProperty(value = "sampleProperty", required = true) private String sampleProperty; ... } I am using AbstractSamplePayload to add propeties to the generated class, AbstractSamplePayload : public abstract class AbstractSamplePayload implements Serializable { protected

How to remove trailing slash from embedded Jetty URLs?

时光总嘲笑我的痴心妄想 提交于 2019-12-05 18:19:21
I use embedded Jetty 9.3.8.v20160314 from Scala (Scala is incidental here, this is a pure Jetty question), configured like this: val loginService = new RepoLoginService(usersRepository, signInsRepo) val server = new Server(8080) server.addBean(loginService) val security = new ConstraintSecurityHandler() server.setHandler(security) val constraint = new Constraint() constraint.setName("auth") constraint.setAuthenticate(true) constraint.setRoles(Array[String]("user", "admin")) val mapping = new ConstraintMapping() mapping.setPathSpec("/*") mapping.setConstraint(constraint) security

java.lang.reflect.InvocationTargetException in jetty-web.xml when setting WebAppContext.configurationClasses

女生的网名这么多〃 提交于 2019-12-04 21:53:43
I'm trying to add org.eclipse.jetty.annotations.AnnotationConfiguration to the configurationClasses property of org.eclipse.jetty.webapp.WebAppContext but (when invoking Jetty with sbt containe:start ), getting: [warn] Config error at <Set name="configurationClasses"> [warn] <Array type="java.lang.String"><Item>org.eclipse.jetty.webapp.WebInfConfiguration</Item><Item>org.eclipse.jetty.webapp.WebXmlConfiguration</Item><Item>org.eclipse.jetty.webapp.MetaInfConfiguration</Item><Item>org.eclipse.jetty.webapp.FragmentConfiguration</Item><Item>org.eclipse.jetty.plus.webapp.EnvConfiguration</Item>

No cipher suites in common in Jetty 9 SSL Configuration

允我心安 提交于 2019-12-04 17:38:50
I have spent the better part of the day on this and so far have been unable to get Jetty 9 configured to serve over HTTPS correctly. This is only for development purposes so I have generated a keystore file that I am attempting to use with Jetty. I am generating the certificate like this: keytool -keystore keystore -alias jetty -genkey -keyalg RSA This is from the Jetty instructions at https://www.eclipse.org/jetty/documentation/current/configuring-ssl.html . Output from mvn -X jetty:run when I start the server showing the cipher suites: [DEBUG] STARTED @7821ms org.eclipse.jetty.server

Jetty 9: Setting up handlers and connectors

[亡魂溺海] 提交于 2019-12-04 14:42:09
I've looked at the documentation for Jetty 9 on the architecture ( http://www.eclipse.org/jetty/documentation/current/architecture.html ) but I am still confused about the relationship between handlers and connectors. Can you link a handler to a specific connector (if so, how? The connector doesn't seem to have a setHandler method)? Or does everything go to a main handler and then you distribute things from there? (i.e. You figure out form what connector it came from so then you forward it to a different handler or handle it yourself) Thanks a lot! Connectors are the components that listen for

How to notify “content consumed” for Jetty 9.02. ContentListener?

喜夏-厌秋 提交于 2019-12-02 17:11:08
问题 I have a Jetty HttpClient sending Async Requests using Jetty v9.0.2. I have a Response.ContentListener that successfully buffers-up response and a Response.CompeleteListener that is called when the call has completed. Jetty 9.2 JavaDocs has a Request.AsyncContentListener which has a parameter to tell Jetty the content has been consumed: callback - the callback to call when the content is consumed. This listener type is NOT in the Jetty v9.0.2 Response api: import org.eclipse.jetty.client.api.

How to prevent consistent java pause pattern on Linux Mint

情到浓时终转凉″ 提交于 2019-12-01 17:53:56
I have a Java app running on Linux Mint. EVERY minute, the program shows a very noticeable slow down -- A pause. The pause is a consistent 3 to 4 seconds. When we run further instances of the same program, they also pause 3 to 4 seconds each minute. Each program stops on a different second of the minute. latest update: After the last update (below) increasing the thread pool's thread count saw the GUI problem go away. After running for around ~40 hours we observed a thread leak in the Jetty HttpClient blocking -GET ( Request.send() ) call. To explain the mechanics, using the Executor class: a