jetty

What is the difference between keyStorePassword and keyManagerPassword in Jetty?

好久不见. 提交于 2019-12-12 10:43:31
问题 I am looking at SSL for Jetty: http://wiki.eclipse.org/Jetty/Reference/SSL_Connectors There are properties for both keyStorePassword and keyManagerPassword. I suppose the keyManagerPassword is used by a Javax KeyManager, and so is a password for recovering keys from the key store? So do keyStorePassword and keyManagerPassword then generally have the same value? 回答1: Keymanagerfactory does have a password. hmmm it is a little history and evolution in these APIs and they could perhaps be made

How to see GWT Jetty devmode from another machine?

拈花ヽ惹草 提交于 2019-12-12 10:08:55
问题 When I fire up Jetty, it gives me the standard URL: http://127.0.0.1:8888/index.jsp?gwt.codesvr=127.0.0.1:9997 Great. I can see this URL from my machine. However, I cannot access this URL from other machine, and replacing the 127.0.0.1 with my actual IP address does not work either. Does anyone know how I can make my server "sharable" so that other people in my network can hit off my machine as well? 回答1: Try to start the server with -bindAddress option using your external IP. See this. 回答2:

stopping/canceling disconnected GET request threads as soon as possible

此生再无相见时 提交于 2019-12-12 10:03:56
问题 I am using jetty, version 7.0.1 if that matters. Sometimes I have some quite long running tasks on a server which I would like to cancel/stop if the client disconnects (in case of GET requests, not e.g. POST file uploads). It seems this is not the case, and that tasks continue to run to completion. Perhaps I can use ServletRequestListener.requestDestoryed listener to get notification of such tasks but what is recommended approach for stoping the request thread? What about releasing resources

secureCat扫描jetty

我的未来我决定 提交于 2019-12-12 09:18:46
jetty 应该是目前最活跃也是很有前景的一个 Servlet 引擎。本文将介绍 Jetty 基本架构与基本的工作原理:您将了解到 Jetty 的基本体系结构;Jetty 的启动过程;Jetty 如何接受和处理用户的请求。你还将了解到 AJP 的一些细节:Jetty 如何基于 AJP 工作;以及 Jetty 如何集成到 Jboss;最后我们将比较一下两个 Servlet 引擎:Tomcat 和 Jetty 的优缺点。 Jetty 的基本架构 Jetty 目前的是一个比较被看好的 Servlet 引擎,它的架构比较简单,也是一个可扩展性和非常灵活的应用服务器,它有一个基本数据模型,这个数据模型就是 Handler,所有可以被扩展的组件都可以作为一个 Handler,添加到 Server 中,Jetty 就是帮你管理这些 Handler。 Jetty 的基本架构 下图是 Jetty 的基本架构图,整个 Jetty 的核心组件由 Server 和 Connector 两个组件构成,整个 Server 组件是基于 Handler 容器工作的,它类似与 Tomcat 的 Container 容器,Jetty 与 Tomcat 的比较在后面详细介绍。Jetty 中另外一个比不可少的组件是 Connector,它负责接受客户端的连接请求,并将请求分配给一个处理队列去执行。 图 1. Jetty

Jetty: adding <resource-env-ref> programmatically

心已入冬 提交于 2019-12-12 09:18:38
问题 I have a standalone application with embedded Jetty and Wicket. I'd like to use CDI for injection. So I've found http://docs.jboss.org/weld/reference/latest/en-US/html/environments.html#d0e5286 and now I'm trying to add this programatically, but it's quite complex. How do I code that? Other sources I've found are: http://osdir.com/ml/java.jetty.support/2007-02/msg00198.html http://docs.codehaus.org/display/JETTY/JNDI So far I have: Server server = new Server( 8080 ); Context ctx = new Context

difference between maven dependency and manually adding jars in WEB-INF/lib

大兔子大兔子 提交于 2019-12-12 09:13:02
问题 I am new to programming web applications, and so far I am working with a eclipse/maven-setup with a Jetty server, to develop java web-apps. One thing I do not understand however, is the dynamics of including external jars. Many tutorials, and Q&A's here on SO claims that it is enough to add the jar to WEB-INF/lib. other explain how I need to add them as dependencies in pom.xml. I have found that some times the first solution works, while some times I also need to add the dependency. I am not

Getting Error scanning file when running jetty 9 on java 8 using the maven jetty plugin [duplicate]

▼魔方 西西 提交于 2019-12-12 08:29:31
问题 This question already has answers here : Spring AOP gives IllegalArgumentException with Java 8 (3 answers) Closed 5 years ago . I'm running a trivial Hello World web application using servlet-3.1, jetty-9 running on jdk-8 and using the maven-jetty-plugin . public class HelloWorldServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) { try { String message = "Hello Jetty From the HelloWorldServlet"; OutputStream stream = response

How to create stand-alone lift web application?

谁说胖子不能爱 提交于 2019-12-12 08:09:48
问题 How to make a standalone lift application? Which tools/libraries to use? How does the performance compare to using lift application as a war in some application server? 回答1: With onejar maven plugin http://onejar-maven-plugin.googlecode.com/svn/mavensite/usage.html and maven I could package jetty and project with dependencies inside one jar. 回答2: The part of the question on performance doesn't really fit with the rest. You are primarily asking how to package the Lift application as a single

Create Hibernate-Session per Request

旧时模样 提交于 2019-12-12 07:57:02
问题 I just started a simple Java testproject which manages some entities using Hibernate and provides a REST interface to manipulate these objects and provide some additional business logic. The REST interface is created using RESTEasy and Jetty. Everything works fine so far, but I have the feeling that I'm actually writing too much boilerplate code. As I don't have much experience in these Java frameworks I'm just wondering if anyone could give me a hint on how to improve the situation. Creting

AsyncContext and I/O error handling (when peer disconnects)

人盡茶涼 提交于 2019-12-12 07:19:15
问题 I'm implementing Server-Sent Events using Servlet 3.0's javax.servlet.AsyncContext interface. However I can't understand how I should handle I/O errors like peer disconnect. For a given AsyncContext ac = request.startAsync() , I can call ac.getResponse().getWriter().print(something) and then ac.getResponse.getWriter().flush() and it works fine. However when a client disconnects, I don't get an error - even if I attach a listener, its onError method is not called. I tested it with both Jetty 8