jetty

How to query the servlet container to obtain effective URL from a ServletContextListener?

a 夏天 提交于 2019-12-13 02:25:53
问题 In extension to this question is there a way to obtain the effective URL of a specific page in the same container from the scope of a ServletContextListener ? A bit of background why I need this : Within a fairly complex system I have setup a simple servlet to display the current information in JSON so I can display it easily on demand. Now I want to go one step further and keep a historical record of this to see the evolution in time of these measurement points. I have setup a simple

Embedding Jetty 9 and customizing Socket Address, Port and ThreadPool?

霸气de小男生 提交于 2019-12-13 01:42:01
问题 I have previously used Jetty 8.1.14 as embedded web server in my application. Now I am trying to upgrade to version 9.2.10. With Jetty 8, it was possible to specify the Host Address and Port using the setters in the "SelectChannelConnector" or "SslSelectChannelConnector", and also the ThreadPool as a constructor argument in the "Server" class. Now, it seems one can only specify one or the other in the "Server" class. There are only constructor variants for the address and/or port, or the

how to deploy jenkins on the jetty correctly?

人走茶凉 提交于 2019-12-13 01:37:16
问题 I'm trying to deploy jenkins on the jetty application server as follows: Unpack the distribution [~]$ unzip jetty-distribution-9.3.2.v20150730 [~]$ cd jetty-distribution-9.3.2.v20150730 Copy your war into place [jetty-distribution-9.3.2.v20150730]$ cp ~/Projects/mywebapp.war webapps/ Run Jetty [jetty-distribution-9.3.2.v20150730]$ java -jar start.jar My version of java is: $ java -version java version "1.7.0_80" Java(TM) SE Runtime Environment (build 1.7.0_80-b15) Java HotSpot(TM) 64-Bit

spring jetty UriInfo inject is null

女生的网名这么多〃 提交于 2019-12-13 01:17:54
问题 we are using spring jetty for rest call. we are injecting context as follows @Context private UriInfo uriInfo; we have inject the uri info in many services. It is working fine for all, except one where it is injected as null. After analyzing log i found for null injected class the type is printed as proxy object as shown in below Jan 18, 2013 4:32:07 PM com.sun.jersey.spi.spring.container.SpringComponentProviderFactory registerSpringBeans INFO: Registering Spring bean,

jsp include doesn't work for jspf files under tomcat 8 but works under the jetty

橙三吉。 提交于 2019-12-13 01:12:25
问题 I have the following jsp: ... <jsp:include page="../imageMenu.jspf"/> ... When I open following jsp when application run under the tomcat 8 I see that my include replaces with empty string. When I run application under the jetty - it renders good. As I undestand the problem related with format of included file because I don't see problem with jsp files included when I run application under the tomcat. 回答1: Working after adding <url-pattern>*.jspf</url-pattern> to web.xml result: <servlet

java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo with embedded jetty with jsp support

ぃ、小莉子 提交于 2019-12-13 00:24:42
问题 Per instructions found in here embedded jetty unable to parse web.xml when jsp jars present in classpath I put together the following startup code to launch jetty with jsp support in embedded mode but still having no luck. I'm gettign the following error, full stack provided farther below: java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo.<init>(Ljava/lang/String;ZLjava/lang/String;ZZLjava/lang/String;ZZLjava/lang/String;Ljava/lang/String;)V The class in question, javax

WebApp accessible via localhost but not 127.0.0.1

放肆的年华 提交于 2019-12-13 00:09:34
问题 i'm running a webapp on Jetty with Maven on my machine (Win7 pro X64) and i'm experiencing some weird problems: when i try to open it on my browser - it's accessible via localhost but not 127.0.0.1 or my local address ( 192.168.0.14 ). when someone else from my local network tries to access the app he can do it via my computer name but not via my local address. NOTE: ping works for localhost and 127.0.0.1 . also, i can access 127.0.0.1 (80) with telnet. windows firewall is off (stopped the

Jetty - How to make a camel application log events to the hawtio Logs tab

蹲街弑〆低调 提交于 2019-12-12 22:05:31
问题 I have a simple camel application logging events on a timer. The logs currently go to a ConsoleAppender. <route> <from uri="timer://hello?period=5000"/> <to uri="log:loggingstuff?showAll=true"/> </route> I have attempted to follow the documentation as per: http://hawt.io/plugins/logs/ The application is deployed as a war on jetty, and has log4j, slf4j and insight-log4j as dependencies. hawtio-default-1.4.37.war is deployed alongside it in the ${jetty.home}/webapps directory. Jetty is started

Load spring context in phases

泪湿孤枕 提交于 2019-12-12 20:03:39
问题 This is one of those strange questions where people would ask - why? So I will start with why I would like to do this and then go into the issue. I would like to have more control over how the spring context is loaded. For example, I do not want to load the domain and web-api at the same time. That would make the resources available before their dependencies are ready. There might also be that I need to check the state of something before I can continue this process. So to say, there will be

wsContext.getMessageContext().get(MessageContext.SERVLET_REQUEST) returns null on Jetty?

六眼飞鱼酱① 提交于 2019-12-12 19:18:54
问题 I have an extension of this question. I have that exact code running on a Jetty Server , and other SOAP web services work perfectly. However, on this line: HttpServletRequest req = (HttpServletRequest)mc.get(MessageContext.SERVLET_REQUEST); System.out.println("Client IP = " + req.getRemoteAddr()); The server crashes with a null pointer exception. mc.get(MessageContext.SERVLET_REQUEST) is returning null. By comparison, mc.get(MessageContext.HTTP_REQUEST_METHOD ) returns "POST", so I assume