jetty

How to get embedded Jetty serving html files from a Jar, not a War

倾然丶 夕夏残阳落幕 提交于 2019-12-18 09:35:10
问题 I have been searching without success in how to get an embedded jetty server to serve a handful of html files that are contained within the same jar. Surely this is possible? I really don't want to go through the hassle of building and working with a war if I don't have to. Ideally I wouldn't have to create a WEB-INFO dir and a web.xml files either, though all solutions I've read seem to point to doing this and using a WebAppContext. I've read the following links, but haven't found a way to

Jetty Websocket IdleTimeout

雨燕双飞 提交于 2019-12-18 08:53:21
问题 I've been working on annotated websockets lately, with the Jetty API (9.4.5 release) , and made a chat with it. However i got an issue, after 5 minutes (which i believe is the default timer), the session is closed (it is not due to an error). The only solution I've found yet, is to notify my socket On closing event and reopen the connection in a new socket. However i've read on stackOverflow, that by setting IdleTimeOut in the WebsocketPolicy, i could avoid the issue: I've tried setting to

Jetty too much data after closed for HttpChannelOverHttp

↘锁芯ラ 提交于 2019-12-18 07:45:07
问题 I'm having trouble with upload one audio file >10s and gives me this error: WARN:oejh.HttpParser:qtp1359061041-19: badMessage: java.lang.IllegalStateException: too much data after closed for HttpChannelOverHttp@7fd0cbe{r=5,a=IDLE,uri=-} If I upload audio file <10s it goes ok. I searched on google, but I couldn't find any solution for this. There's any solution for this? 回答1: I'm using Cordova 3.3.0, and the problem was on the upload. The code below solved my case: var options = new

Jetty too much data after closed for HttpChannelOverHttp

旧时模样 提交于 2019-12-18 07:44:28
问题 I'm having trouble with upload one audio file >10s and gives me this error: WARN:oejh.HttpParser:qtp1359061041-19: badMessage: java.lang.IllegalStateException: too much data after closed for HttpChannelOverHttp@7fd0cbe{r=5,a=IDLE,uri=-} If I upload audio file <10s it goes ok. I searched on google, but I couldn't find any solution for this. There's any solution for this? 回答1: I'm using Cordova 3.3.0, and the problem was on the upload. The code below solved my case: var options = new

Jetty ssl port not open for secure JSR-356 websockets

爱⌒轻易说出口 提交于 2019-12-18 07:18:44
问题 I'm writing a server app that uses secure websockets using embedded Jetty 9.3.0.M2. When I run it without secure sockets, everything is copacetic, but when I enable the secure sockets, my clients get connection refused and nmap shows that the port is closed. There are no errors in the log on the server side. I believe that my .jks, .crt, .pem, and .key files and my keystore password are all correct, because other apps on this same server are using the same ones and are working. Here is the

ResourceHandler stop hosting files with jetty 9 - 404 not found error (works fine with jetty 8)

戏子无情 提交于 2019-12-18 07:11:32
问题 Apparently, ResourceHandler stop hosting files with jetty 9 - 404 not found error (works fine with jetty 8). Here is the code: ResourceHandler resourceHandler = new ResourceHandler(); resourceHandler.setDirectoriesListed(true); resourceHandler.setResourceBase("some_resource_base"); HandlerList handlerList = new HandlerList(); handlerList.setHandlers(new Handler[]{servletHandler, resourceHandler}); server.setHandler(handlerList); server.start(); This quistion with the accepted answer does not

Spring boot can not find jsp views

核能气质少年 提交于 2019-12-18 06:58:25
问题 Helo everyone! I completed my Spring based web app and then started to rebuild it to Spring boot because it gives me ability to use embedded jetty . At the moment I got some problem - Spring boot can not find (resolve) jsp views. So when I run my app - I get the error in browser: Here is my web app on github - so you can just look at files and find the reason. Help me please! P.S. Yes I used @ResourceImport because I don't know how to rewrite the existing spring configuration xml files to

GWT: Jetty version in dev mode

£可爱£侵袭症+ 提交于 2019-12-18 04:52:15
问题 I have two questions: 1. Which Jetty version is used by GWT 2.5.1 in dev-mode? 2. Is there a way to change this version? 回答1: 6.1.11 (source: https://gwt.googlesource.com/gwt/+/2.5.1/dev/build.xml) Note that 2.6 and 2.7 use Jetty 8.1.12.v20130726, and 2.8 uses Jetty 9.2.14.v20151106 Yes, you can implement a ServletContainerLauncher that starts another version of Jetty. Beware of classpath conflicts though! (but I suppose you'll want to use a recent version and the new versions use org.eclipse

GWT: Jetty version in dev mode

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-18 04:52:10
问题 I have two questions: 1. Which Jetty version is used by GWT 2.5.1 in dev-mode? 2. Is there a way to change this version? 回答1: 6.1.11 (source: https://gwt.googlesource.com/gwt/+/2.5.1/dev/build.xml) Note that 2.6 and 2.7 use Jetty 8.1.12.v20130726, and 2.8 uses Jetty 9.2.14.v20151106 Yes, you can implement a ServletContainerLauncher that starts another version of Jetty. Beware of classpath conflicts though! (but I suppose you'll want to use a recent version and the new versions use org.eclipse

How to run jetty 7+ with specified war with groovy/gradle?

我与影子孤独终老i 提交于 2019-12-18 04:48:05
问题 I want to run Jetty 7+ with gradle build, but unlucky looks like there is no way to do this with jettyRun. So probably simplest idea to achieve what I want would be to use custom target: task runJetty << { def server = new Server() // more code here server.start() server.join() } Unlucky I just started with gradle and I don't know groovy either, so it's hard for me to create proper target. I was looking over the internet but I wasn't able to find any solution. Can anyone hit me with some