jetty

Response Header too large - Jetty Embedded version 9

非 Y 不嫁゛ 提交于 2019-12-10 17:50:29
问题 I'm getting an exception of "Response Header too large" when using Jetty, the exception is thrown at the Client and only when the size of the jsonValue is large (greater than 1500 bytes). If the jsonvalue is smaller, everything works fine. This is the code I have, it is very simple. Server Code: Server server = new Server(8080); ServletHandler handler = new ServletHandler(); server.setHandler(handler); handler.addServletWithMapping(StoreServlet.class, "/store"); server.start(); server.join();

Configuring a Jetty application with env variables

孤人 提交于 2019-12-10 17:47:29
问题 I'm trying to deploy a Java WAR file in Jetty 9 with Docker. I would like to configure things as database URI string, loglevel and such via environment variables - so that I could also use the link features of Docker. But, if I start the application via java -jar start.jar , the environment variables I've set are not available to the application. What is the simplest way to pass environment variables to my application? 回答1: Using system environment variables (aka System.getenv(String)) is not

JSP compilation error on jetty-9.3.3

喜欢而已 提交于 2019-12-10 17:28:56
问题 I have a webapp application which was running on embedded Jetty-7.6.8 (jdk-6), but due to Diffe-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. Right now jetty is starting up with no error but when I try to access my login page I get an unable compile jsp error. These are the dependencies: -org.eclipse.jetty.apache-jsp-9.3.3.v20150827.jar -org.mortbay.jasper.apache-el-8.0.23.M1.jar -org

How to install jetty with eclipse on Mac

我的梦境 提交于 2019-12-10 17:21:55
问题 I am a newbie w.r.t. jetty and RESTful API's. I want to create REST services using Jetty and wants to use embedded jetty with eclipse. Can anyone suggest me any HowTo for installing Jetty/ Jetty plugins with Eclipse in Mac OS. Regards, 回答1: If you're looking for an Eclipse plugin that will allow you to start your web app in Jetty via the Debug/Run menus, you may want to take a look at the run-jetty-run plugin. If you happen to be using Maven, there's a Maven plugin you can use to start your

Jetty Response with no Charset

て烟熏妆下的殇ゞ 提交于 2019-12-10 17:17:49
问题 I'm using Jetty to test a webservice we have and I am trying to get it to respond with no charset under the content-type header. Does anyone know how to do this? I've tried intercepting the Response and setting the CharacterEncoding to null or "" but that gives Exceptions. I am using Jetty 6.1.6. 回答1: I tried it my self now, but I must admit, my jetty is a very old one (4.2., but does everything the way I need it). I compared it to tomcat (4.1.29, old too). I checked the content type with the

Grails running in Jetty renders 404 error page without layout template

半腔热情 提交于 2019-12-10 17:17:28
问题 I've a Grails 2.0.1 application. I set up the following UrlMapping: "/"(controller:"home") "500"(view:'/error/serverError') "404"(view:'/error/notFound') This is my notFound.gsp page: <%@ page contentType="text/html;charset=UTF-8" %> <html> <head> <meta name="layout" content="main"/> <title>404 Not Found</title> </head> <body> <h2>Page not found</h2> <p>Back to <a href="${createLink(uri:'/')}">homepage</a></p> </body> </html> While developing (under Tomcat) the 404 error page renders

Jersey on Jetty on Android throws ContainerException: “No WebApplication provider is present”

妖精的绣舞 提交于 2019-12-10 16:47:44
问题 I'm trying to run Jersey on Jetty on Android. I've created an Android that instantiate a Jetty Server with a Jersey Servlet. Anyway when I start Jetty and visit a REST resource (in my case: http://192.168.1.12:8080/api/hello ) I get a ContainerException with message: No WebApplication provider is present (see exception stack trace below). Any idea why? I've added javax package JNDI to the project since it was required by either Jetty or Jersey. Android doesn't like imporitng javax libraries

Gradle: Run multiple webapps with Jetty

爱⌒轻易说出口 提交于 2019-12-10 16:44:22
问题 I want to run two webapps created by the same Gradle project into a Jetty server. Let's call these two webapps "ninja" and "warrior". Both webapps are very similar, they only differ in the application-context file (referenced in the web.xml file) and resources. In order to deploy them, these two options are accepted: Use different ports: http://www.example.com:8080/app (ninja webapp) http://www.example.com:8081/app (warrior webapp) Use different paths: http://www.example.com:8080/ninja_app

google Cloud spanner java.lang.IllegalArgumentException: Jetty ALPN/NPN has not been properly configured

不打扰是莪最后的温柔 提交于 2019-12-10 15:38:59
问题 I am new to the Google cloud Spanner and to explore it I started with documentation provided by google Here. To explore any database we start with data operations and the same I did, I started with writing data to the spanner using simple java application given here https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/spanner/cloud-client/src/main/java/com/example/spanner/SpannerSample.java. I have made changes in driver class on respective places shown in following code

Spring Boot: hot swapping does not work

房东的猫 提交于 2019-12-10 15:14:51
问题 I'm using Spring Boot 1.3.2 with gradle plugin. In my multipart project hot swapping/reload for HTML/JS/CSS files does not work. /resources |-wro.groovy |-application.yml |-/templates/(all *.html files and index.html) |-/static/ |-/js/ |-/css/ application.yml server: port: 8080 spring: thymeleaf: cache: false prefix: classpath:/templates/ suffix: .html enabled: true encoding: UTF-8 mode: HTML5 In te projet also used: wro4j, thymeleaf, AngularJS Part of gradle.build buildscript { ext {