jetty

How do I suppress Jetty 8's default ErrorHandler?

坚强是说给别人听的谎言 提交于 2020-01-02 14:31:26
问题 Jetty is helping my application too much. Whenever some unhandled Exception leaks out the top, Jetty takes it upon itself to build a very verbose response and spam it onto my clients HTTP/1.1 500 com.mongodb.MongoException: No replica set members available in [ { address:'localhost/127.0.0.1:27017', ok:true, ping:0.49878865, isMaster:false, isSecondary:true, setName:dmReplSet, maxBsonObjectSize:16777216, },{ address:'localhost/127.0.0.1:27018', ok:true, ping:0.2565605, isMaster:false,

How do I suppress Jetty 8's default ErrorHandler?

寵の児 提交于 2020-01-02 14:30:16
问题 Jetty is helping my application too much. Whenever some unhandled Exception leaks out the top, Jetty takes it upon itself to build a very verbose response and spam it onto my clients HTTP/1.1 500 com.mongodb.MongoException: No replica set members available in [ { address:'localhost/127.0.0.1:27017', ok:true, ping:0.49878865, isMaster:false, isSecondary:true, setName:dmReplSet, maxBsonObjectSize:16777216, },{ address:'localhost/127.0.0.1:27018', ok:true, ping:0.2565605, isMaster:false,

Making JSESSIONID cookie be httpOnly in Jetty 7

本秂侑毒 提交于 2020-01-02 10:26:06
问题 We're running grails 2.0 + jetty 7.6.6 and need to set JSESSIONID cookie to be httpOnly. All of the answers on stackoverflow seem to refer to either Servlet 3.0 (which requires jetty 8) or to tomcat. Can anyone provide me with a clear way of setting the JSESSIONID cookie be httpOnly for jetty 7.x? I have tried adding jetty-web.xml file with the following contents, but it still didn't work (i.e. the JSESSIONID wasn't marked as httpOnly): <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE

How do I set up Jetty 6 & Jboss 4.0.5 virtual hosting?

允我心安 提交于 2020-01-02 10:19:31
问题 I have 2 webapps deployed in the same JBoss/Jetty server. In Jetty 5.1.14 I had the following jetty-web.xml which configured one of the apps to run as a virtual host (on the same port): <Configure class="org.jboss.jetty.JBossWebApplicationContext"> <Call name="addVirtualHost"><Arg>app2.localhost.com</Arg></Call> </Configure> This worked perfectly fine. Unfortunately, it doesn't work with Jetty 6.1.17 at all. First of all, "JBossWebApplicationContext" seems to now be called "JBossWebAppContext

Embedded Jetty: In secure https server, ContextHandler redirects to http URI

偶尔善良 提交于 2020-01-02 08:48:08
问题 I'm building a sandbox RESTful API using embedded Jetty. My Proof-of-Concept design: a simple embedded jetty server that (1) accepts connections on an SSL port and (2) uses a ContextHandlerCollection to invoke the proper Handler based on the URI prefix. My original test, using a simple non-SSL connection, seemed to work perfectly (note, code for imports and helper HelloHandler class in APPENDIX). public static void main(String[] args) throws Exception { Server server = new Server(12000);

Jetty HTTP/2 Client example

China☆狼群 提交于 2020-01-02 08:09:44
问题 I used the client code Jetty provide to us. And some problem occurs. The code I wanna run is here https://github.com/eclipse/jetty.project/blob/master/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/Client.java And actually I know I come across the same problem like this Jetty HTTP/2 client receive server push example I stopped at this guy's update 2 and I have built a new project under the http2-client folder. But the problem still remains. INFO::main: Logging

How to set up eclipse with GWT and (regular servlet) Jetty backend

限于喜欢 提交于 2020-01-02 07:47:27
问题 Does anybody know how to set up a project in Eclipse with GWT and a jetty backend (regular web app, not app engine)? Or know of a good link (tried googling it, but no dice) I've been trying to set up this all evening, but just ran into a number of strange problems, some seems to be bugs in WST/Jetty and the other is that the host page just doesn't work :-( 回答1: There are three ways to run your own jetty server together with GWT. If you run your own jetty server you have to invoke dev-mode in

Solr search query returning full head exception

一笑奈何 提交于 2020-01-02 05:45:08
问题 I am calling remote solr search hosted on other machine in a c# application. Now since my query length becomes too large so search engine is returning full head error. I can't reducing query length. so i just wanted to know can i make a post request for the same? how would i make this?Please suggest me.Thanks. 回答1: Looks like you are running into jetty's default GET parameter size limit. This can be adjusted by changing headerBufferSize in jetty.xml. Refer to this link on configuring jetty -

JMockit + Jetty in functional tests

江枫思渺然 提交于 2020-01-02 04:32:29
问题 I'm using ShrinkWrap to start Jetty server in my integration tests. Problem: When I start my test jetty-server and than make mockup of my controller - mockup doesn't work! I suggest that the reason is different classloaders: JMockit - AppClassLoader, Jetty - WebAppClassLoader. Question: How to make mocking works fine? P.S. I've googled that -javaagent:jmockit.jar option may help. But it doesn't. Is it necessary for maven project based on 1.7 jdk? ADDITION: I've written demo to illustrate my

Where to store static files like html/css/javascript in a jetty project?

[亡魂溺海] 提交于 2020-01-02 02:56:27
问题 I have a maven project that I run using jetty: $ mvn run:jetty Where in my project should I be storing my static files like HTML, CSS, Javascript, images? My layout is using a simple web app arch type: /src/main/java/webapp/web-inf/views/ Should I just create a folder there named e.g. 'assets' ? And then my view pages will reference the /assets folder somehow? I'm confused as to what path I will use in my html pages to reference an image like: /assets/images/logo.png 回答1: This isn't so much a