jetty

Getting jetty to log with the correct timezone

一笑奈何 提交于 2019-12-21 20:46:19
问题 I'm using Jetty 8 and am configuring my jetty.xml to customise the requests.log files. My problem is, Jetty is serving the logs with a timestamp in the GMT timezone - I'm in the UK but its now summer time (GMT+1, aka, BST). Probably because of: <Set name="LogTimeZone">GMT</Set> How do I get Jetty to serve the logs using whatever the local time on the server is (which is correct)? Simply removing the <Set name="LogTimeZone">GMT</Set> didn't do anything, and I don't want to have to manually

How to share sessions between modules on a Google App Engine Java application?

给你一囗甜甜゛ 提交于 2019-12-21 19:18:07
问题 When I store something in the session via HttpSession in module A: HttpSession session = req.getSession(true); session.setAttribute("username", "Eng.Fouad"); then I try to retrieve this information from within module B (during the same browser session): HttpSession session = req.getSession(true); String username = session.getAttribute("username"); // null! I got null as a value, which means different session. How to share session across multiple modules in GAE? Old Answer which I think it

Can I integrate Shibboleth SSO in my Java Webapp without using Apache and shibd?

陌路散爱 提交于 2019-12-21 17:41:40
问题 I'm working on a pure Java web application that uses an embedded Jetty and I want to integrate a Shibboleth login. To do this, I'm following switch.ch's guide for Shibboleth Service Provider Deployment, which states: The Shibboleth Service Provider consists of a daemon shibd running on all major operating systems and a web server module mod_shib which is natively supported by: Apache web servers (versions 1.3.x, 2.x) IIS (versions 6, 7 and 8) My question is, is there a way to integrate

Auto run Jetty on boot

非 Y 不嫁゛ 提交于 2019-12-21 13:08:39
问题 I'm trying to get Jetty to auto start on my Ubuntu. I've done these commands: cp /opt/jetty/bin/jetty.sh /etc/init.d update-rc.d jetty.sh defaults but when I run it I got a "Not starting jetty - NO_START=1 ". Does anyone know why? Secondly, the following is stated inside the jetty.sh. # To get the service to restart correctly on reboot, uncomment below (3 lines): # ======================== # chkconfig: 3 99 99 # description: Jetty 7 webserver # processname: jetty # ========================

Add more than one resource directory to jetty

会有一股神秘感。 提交于 2019-12-21 07:45:59
问题 Looking to use multiple static directories with Jetty. When the server runs: http://localhost:8282/A http://localhost:8282/B http://localhost:8282/C A is placed in X/V/A B is placed in Q/Z/B C is placed in P/T/C The following failed: ResourceHandler resource_handler = new ResourceHandler(); resource_handler.setWelcomeFiles(new String[]{"index.html"}); resource_handler.setResourceBase(HTML_SITE); ResourceHandler resource_handler1 = new ResourceHandler(); resource_handler1.setWelcomeFiles(new

How can I create a servlet with jruby (running with jetty)?

烂漫一生 提交于 2019-12-21 06:57:45
问题 I am pretty new to jruby and java and want to create a servlet in jruby while using jetty as web server. I am not sure if I am on the right way with the following code which shows the input form so far. I guess I have to extend now the HttpServlet class to handle the posted data but I don't know how to do this in this case and if it is okay to do this in the same script. require 'java' Dir["./jetty-6.1.18/lib/*jar"].each { |jar| require jar } Dir["./Java/lib/jsdk2.1/javax/*jar"].each { |jar|

Jetty 8.1.1 Websocket client handshake

戏子无情 提交于 2019-12-21 05:12:42
问题 I'm using Jetty 8.1.1 Websocket client api. I need to update the headers with ("Sec-WebSocket-Protocol", "xsCrossfire") and ("Authorization", "Basic TLVWQMZqRr2hasYnZoI=") WebSocketClientFactory factory = new WebSocketClientFactory(); factory.start(); client = factory.newWebSocketClient(); client.getCookies().put("Sec-WebSocket-Protocol", "xsCrossfire"); client.getCookies().put("Authorization", "Basic TLVWQMZqRr2hasYnZoI="); Future<Connection> conn = client.open(uri, (WebSocket) this); System

Jetty bash script works only with root user

China☆狼群 提交于 2019-12-21 05:05:11
问题 I have installed Jetty 9 (latest version) by extracting the archive in /opt/jetty . The start.jar runs fine, but I want the bash service bin/jetty.sh , to be run by a non-root user. The issue I'm having with the bash script is that : when I dont specify a value for $JETTY_USER in /etc/default/jetty (it uses root user), Jetty works. But when I assign a value to it, Jetty fail with the message: Starting Jetty: FAILED , and no log. So, how do I create a user that can run the jetty? 回答1: I know

How to enable logging in jetty?

时光毁灭记忆、已成空白 提交于 2019-12-21 04:17:51
问题 I am trying to debug my case, where simple ActiveWeb application is not running under Jetty. It behaves as if no any classes for request processing exist and return error 404. The question is not about ActiveWeb. It is about Jetty. How to find out, that having some web application, Jetty has fond annotated class and will execute it on HTTP request? Currently I have downloaded Jetty and it works. Unfortunately, it does no logging. Nothing is displayed in stdout or stderr and no files appear in

Exception at start of request - ClientAuth SSL

五迷三道 提交于 2019-12-21 04:01:11
问题 I have an application embedding Jetty. I would like to use client cert authentication in SSL and when I enable that; I am getting the following exception at start of request. But the request is getting served properly after that. This exception comes only when accessed from IE or Chrome. It does not come when accessed from Firefox. We have our custom SSLConnector extending SslSocketConnector. I am trying to debug it; but wanted to know if there is any specific place/code where I can start