jetty

Jetty 6 always generates debug logs?

时光毁灭记忆、已成空白 提交于 2019-12-12 01:35:29
问题 I am using Jetty 6.1.24 to develop a Web Service and my code uses slf4j, as Jetty does, and logging is working fine. What I want to do though is get debug logging from my code but not from Jetty (it's too verbose), but I cannot stop it from logging debug info. There are system properties to set debug mode (-DDEBUG), but not to unset debug mode. My logback log level is set by the start script by setting the system property 'loglevel' and this in turn sets it in my resources/logback.xml:

Set Access-Control-Allow-Origin in Jetty

自古美人都是妖i 提交于 2019-12-12 01:26:38
问题 I need to set "Access-Control-Allow-Origin" to "*" by code. Reading this i've tried to set org.eclipse.jetty.servlets.CrossOriginFilter using setInitParameter : Server server = new Server(activity.WEB_SERVER_PORT); ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS); context.setWelcomeFiles(new String[] { "index.html" }); context.setContextPath("/"); context.setInitParameter("org.eclipse.jetty.servlets.CrossOriginFilter", "/*"); TheServlet sv = new

embedded jetty unable to parse web.xml when jsp jars present in classpath

房东的猫 提交于 2019-12-12 01:24:47
问题 I'm getting the following error when starting my app as embedded jetty: Exception initializing TldLocationsCache: XML parsing error on file /WEB-INF/web.xml: (line 2, col 9): Document is invalid: no grammar found. My web.xml: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">

Jasper on a jsf app in heroku

♀尐吖头ヾ 提交于 2019-12-12 00:27:51
问题 I am working in an application that uses jasperreports. It uses Primefaces with Mojarra, and is deployed in Jetty. When I deploy the app locally, it does work ok. But when I deploy in heroku it is not working. When I deploy it to heroku I obtain: HTTP ERROR 500 Problem accessing /pages/client.jsf. Reason: STREAM Caused by: java.lang.IllegalStateException: STREAM at org.eclipse.jetty.server.Response.getWriter(Response.java:683) at com.sun.faces.context.ExternalContextImpl

Two Way SSL with Jetty and Null Cipher

﹥>﹥吖頭↗ 提交于 2019-12-12 00:12:45
问题 I have an application running in Jetty. In front of it, I have a load balancer. The requirement is to have SSL decryption done by the load balancer while the web container does only SSL client authentication. The theory is that the load balancer is very efficient at decrypting the content and can do that and pass it in plain to the web container. Any idea how this can be achieved? 回答1: It's not clear what you mean by "Null Cipher" in your title. There are 3 possible candidates: TLS_NULL_WITH

nginx chunked transfer encoding fails

浪子不回头ぞ 提交于 2019-12-11 21:04:51
问题 I am using an implemention of nginx with jetty servlets. For the purpose of my project I need to initialize two connection to the jetty servlet and keep them open. To initialize the downlink I use a normal request and I get the inputstream back. To initialize the uplink I use a chunked encoding request. I use a 1.4.6 nginx version so the chunked encoding should be set by default, regardless I set it in my server definition. #HTTPS server server { listen 443; listen [::]:443; server_name

Java, Android : Jetty scheduler method throwing NPE, don't know where it's getting called

和自甴很熟 提交于 2019-12-11 20:29:05
问题 I am working on an Android application in which I am trying to initialize a LongPollingTransport as mentioned below. But I am getting an error from Jetty scheduler. I am not calling the Jetty Scheduler class myself. How can I fix this. Any help would be nice. Code : public class ConsoleChatClient { private volatile String nickname = "kernel"; private volatile BayeuxClient client; private final ChatListener chatListener = new ChatListener(); private final MembersListener membersListener = new

Embedded jetty & jersey, works with Jersey 2.7, exception with 2.9

▼魔方 西西 提交于 2019-12-11 20:15:56
问题 I'm trying the examples on: How to embed Jetty and Jersey into my Java application https://nikolaygrozev.wordpress.com/2014/10/16/rest-with-embedded-jetty-and-jersey-in-a-single-jar-step-by-step If I run this with Jersey 2.7 (and Jetty 9.2.5.v20141112), it works. If I update Jersey to 2.9 (or 2.14), it fails on startup with: WARN 2015-01-18 17:02:13,076 e.jetty.util.component.AbstractLifeCycle:212 - FAILED org.eclipse.jetty.server.Server@1741055a: java.lang.NoSuchMethodError: org.glassfish

How do I run nginx as proxy to jetty?

情到浓时终转凉″ 提交于 2019-12-11 19:39:20
问题 I have this setup: I installed nginx and Jetty on an ubuntu machine that I am using as the server. I tested Jetty and it is running on 0.0.0.0.:8080 and I see the Jetty Welcome page. The domain that I will be using is nomilkfor.me. The nginx conf file is in /etc/nginx/sites-available/nomilkfor.me.conf . I am programming on an another laptop (OSX) and I created a project web_test with lein. I created a .war file of web_test and when I run lein ring server I see the content of core.clj on the

Using JProfiler on Linux

假装没事ソ 提交于 2019-12-11 18:47:03
问题 I need to profile jetty server on linux system, for it I've started jetty using next command line JAVA_OPTIONS='-Xrunjprofiler' sh jetty.sh start and received error Could not find agent library on the library path or in the local directory: jprofiler , How can I added library path on linux? Thanks. 回答1: try adding the Jprofiler to the PATH. I hope it works. 来源: https://stackoverflow.com/questions/4541857/using-jprofiler-on-linux