jetty

Solr with Jetty on LAMP server - Admin page access issue

纵然是瞬间 提交于 2019-12-25 02:00:25
问题 I have Solr with its default Jetty that came with example directory installed on Linux server which has apache2 as its web server . Now, within the same private LAN, when I open a browser and type in http://<ip-address>:8983/solr works ONLY when I do port forwarding otherwise it doesn't work . I am not sure what could be the problem? Please note this installation has been done on a remote server in a hosting environment for production deployment and I am a beginner wrt deployment stuff. 回答1:

Jetty How to add a servlet to multiple ServletContextHandler or apply ContainerRequestFilter to ContextHandlerCollection

≯℡__Kan透↙ 提交于 2019-12-25 01:49:35
问题 I need to intercept all the requests when there are multiple ServletContextHandler configured. I have multiple ServletContextHandler in a ContextHandlerCollection and a ContainerRequestFilter . I need this ContainerRequestFilter to be added to all ServletContextHandler Only way I could find of adding the ContainerRequestFilter was through ResourceConfig . So I did this: ResourceConfig resourceConfig = new ResourceConfig(); resourceConfig.register(MyContainerRequestFilter.class); ServletHolder

NameNotfoundException in Jetty 9 at mail session resource JNDI lookup

只愿长相守 提交于 2019-12-25 01:39:02
问题 I'm writing a REST API backend servlet with Jersey, and I have some problems using jndi to configure mail sending. Here's my WEB-INF/jetty-env.xml: <?xml version="1.0"?> <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd"> <Configure id='wac' class="org.eclipse.jetty.webapp.WebAppContext"> <New id="mail" class="org.eclipse.jetty.plus.jndi.Resource"> <Arg><Ref refid="wac"/></Arg> <Arg>mail/Session</Arg> <Arg> <New class="org

Jetty client and PATCH method

感情迁移 提交于 2019-12-25 01:17:00
问题 Is it possible to execute PATCH method with jetty client? I am using Jetty 9.3.3 and the PATCH method is not defined in the enum HttpMethod. I also checked the api of Jetty 9.3.10 and I did not find the PATCH method in the enum HttpMethod. if it is not supported, how can I extend the Jetty code to be able to use it? I only needed it in the client side (Jetty client need to be able to send Patch request). Thanks and best regards. 回答1: Yes, it's possible to use the PATCH verb with the Jetty

maven-jetty plugin not using correct paths

我与影子孤独终老i 提交于 2019-12-25 01:12:49
问题 I am using the jetty-maven plugin to deploy a web-app for integration testing. I have a project which consists of a two POMs. One in the root, and one in a directory in the project root (call this the webapp directory). When I run the integration test from maven (which uses the jetty-maven plugin), in the webapp directory, it works perfectly fine. However, when I run it from the root directory, it goes inside the webapp directory and runs the test but for some reason it gets the paths wrong.

Unable to use embedded-jetty in Android

故事扮演 提交于 2019-12-25 01:11:58
问题 I am trying to embed the latest Jetty in android. But it is not working. I am trying to make Jetty listen to a custom incoming HTTP method, NOTIFY. It works in desktop, now I am trying to import it to Andoird Here is my code. package com.example.arjun.hellotest; import android.util.Log; import java.io.IOException; import java.io.BufferedReader; import java.util.Enumeration; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http

FileSizeLimitExceededException while uploading file greater than allowed limit

女生的网名这么多〃 提交于 2019-12-25 00:22:28
问题 public static void parseUpload(HttpServletRequest request) throws AttachmentException { if (ServletFileUpload.isMultipartContent(request)) { DiskFileItemFactory factory = new DiskFileItemFactory(); factory.setSizeThreshold(10 * 1024 * 1024); // 10 MB ServletFileUpload uploader = new ServletFileUpload(factory); uploader.setSizeMax(3 * 1024 * 1024); // allowed file size uploader.setFileSizeMax(3 * 1024 * 1024); List<FileItem> items; try { items = uploader.parseRequest(request); // throws

isReady() returns true in closed state - why?

前提是你 提交于 2019-12-24 21:53:16
问题 ServletOutputStream.isReady() javadoc says the following: Returns: true if a write to this ServletOutputStream will succeed, otherwise returns false. In spite of that Jetty's ServletOutputStream implementation, HttpOutput seems to behave rather confusing in the case when the stream is in CLOSED state. It returns true : case CLOSED: return true; Source: HttpOutput.java:1011. Furthermore, all three write methods in HttpOutput throws EofException when it's CLOSED : case CLOSED: throw new

applcation.properties with maven jetty plugin

*爱你&永不变心* 提交于 2019-12-24 19:38:22
问题 I try to configure maven jetty plugin to run on 8443 (TLS) port. I read much stuff about including official documentation. This manual https://www.eclipse.org/jetty/documentation/9.4.x/jetty-maven-plugin.html#configuring-security-settings suggest to configure it with XML files, but I didn't succeed to configure path for keystore there. So I continued to application.properties way from here https://drissamri.be/blog/java/enable-https-in-spring-boot/ The problem is that jetty not recognizing

Why Netbeans jetty plugin doesn't run but jetty:run works on my project?

陌路散爱 提交于 2019-12-24 17:42:44
问题 I'm learning swagger, created maven project running jetty plugin, when I ran the project from Netbeans, got the following error message : ant -f C:\\JettyServerInstance\\jettybase -Druntime.encoding=UTF-8 -Dnpn.boot= -Dserver.debug.transport=dt_socket -Dstop.key=netbeans -Dstop.port=8180 -Ddebug.args.line=-Xdebug -Dserver.debug.port=4000 -Dstart.jar=C:\\jetty/start.jar -Dtarget=run run pre-run: run: 2015-07-21 14:53:27.271:INFO::main: Logging initialized @507ms 2015-07-21 14:53:27.335:WARN