jetty-8

Deactivate Jetty's default 404 error handler

自作多情 提交于 2019-12-09 16:39:05
问题 I want to provide a custom 404 error page in my Spring 3.1 web application, but I cannot deactivate Jetty 8's default 404 error page. Jetty 8, out of the box, provides a default 404 error page: when visiting a Jetty-hosted website, and providing a URL path that is not handled by any servlet (e.g. by visiting http://www.example.com/nonexisting ), Jetty responses with its own default HTML error page : HTTP ERROR 404 Problem accessing /nonexisting. Reason: Not Found Powered by Jetty:// To

How Jetty handles class loading with same class with different dependencies?

会有一股神秘感。 提交于 2019-12-08 17:10:04
问题 I want to know how jetty handles when multiple dependency paths which can lead to same class. For example, Jetty comes pre-packaged with JSTL-1.2, but I added a dependency to load JSTL-1.2.4. At compile time, if I breakpoint test it downloading the source code in eclipse, it breaks at 1.2.4 version. I want to know which version will be passed to generate byte code of a JSP, when there are two versions of classes, say some base class JstlCoreTlv in dependency (one pre-packaged, that is JSTL 1

Could not find resource path for Web UI: org/apache/spark/ui/static While creating a Spark application

你说的曾经没有我的故事 提交于 2019-12-06 08:36:43
I am creating a java API using spark-cassandra-connector.When it is running on eclipse it is working fine. Then i created a runnable jar file and executed it through the command line , its giving me following error. 15/02/17 14:56:41 INFO spark.HttpServer: Starting HTTP Server 15/02/17 14:56:42 INFO server.Server: jetty-8.y.z-SNAPSHOT 15/02/17 14:56:42 INFO server.AbstractConnector: Started SocketConnector@0.0.0.0:58625 Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl

Solr 4 with basic authentication

夙愿已清 提交于 2019-12-04 04:27:38
问题 I am trying to connect to solr using solrj. My solr instance runs in jetty and is protected with basic authentication. I found these links that contain relevant information. http://grokbase.com/t/lucene/solr-user/1288xjjbwx/http-basic-authentication-with-httpsolrserver Preemptive Basic authentication with Apache HttpClient 4 However, I still get the following exception: Caused by: org.apache.http.client.ClientProtocolException at org.apache.http.impl.client.AbstractHttpClient.execute

Solr 4 with basic authentication

血红的双手。 提交于 2019-12-01 21:26:15
I am trying to connect to solr using solrj. My solr instance runs in jetty and is protected with basic authentication. I found these links that contain relevant information. http://grokbase.com/t/lucene/solr-user/1288xjjbwx/http-basic-authentication-with-httpsolrserver Preemptive Basic authentication with Apache HttpClient 4 However, I still get the following exception: Caused by: org.apache.http.client.ClientProtocolException at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:822) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java

Spring 3.1 WebApplicationInitializer & Embedded Jetty 8 AnnotationConfiguration

回眸只為那壹抹淺笑 提交于 2019-11-28 18:13:26
I'm trying to create a simple webapp without any XML configuration using Spring 3.1 and an embedded Jetty 8 server. However, I'm struggling to get Jetty to recognise my implementaton of the Spring WebApplicationInitializer interface. Project structure: src +- main +- java | +- JettyServer.java | +- Initializer.java | +- webapp +- web.xml (objective is to remove this - see below). The Initializer class above is a simple implementation of WebApplicationInitializer : import javax.servlet.ServletContext; import javax.servlet.ServletException; import org.springframework.web

restful service interface with jersey

不羁的心 提交于 2019-11-28 12:41:52
Can I create a restful service with interface and implementation class? and all JAX-RS related imports go into the interface? i am using jersey2.4 and jetty8.1. here is my interface: MyService.java package foo.bar; @Path("/abc") public interface MyService { @GET @JSONP @Path("/method/{id}") public MyResponse getStuff(@PathParam("id") Integer id); } MyServiceImpl.java package foo.bar.impl; public class MyServiceImpl implements MyService { public MyServiceImpl() {} @Override public MyResponse getStuff(Integer id) { // do stuff return MyResponse; } } here's my web.xml: <servlet> <servlet-name

Spring 3.1 WebApplicationInitializer & Embedded Jetty 8 AnnotationConfiguration

孤人 提交于 2019-11-27 11:08:03
问题 I'm trying to create a simple webapp without any XML configuration using Spring 3.1 and an embedded Jetty 8 server. However, I'm struggling to get Jetty to recognise my implementaton of the Spring WebApplicationInitializer interface. Project structure: src +- main +- java | +- JettyServer.java | +- Initializer.java | +- webapp +- web.xml (objective is to remove this - see below). The Initializer class above is a simple implementation of WebApplicationInitializer : import javax.servlet