Re: [jetty-users] Jetty SPDY use split package?
Thanks for your update. I will make a try late -Original Message- From: jetty-users-boun...@eclipse.org [mailto:jetty-users-boun...@eclipse.org] On Behalf Of Hugues Malphettes Sent: Tuesday, September 25, 2012 2:22 PM To: JETTY user mailing list Subject: Re: [jetty-users] Jetty SPDY use split package? Too many typos, let's try again: Hi Guofeng, We just updated the generation of the OSGi manifests for jetty-9. SPDY in OSGi is still a work in progress. The npn library does not have an OSGi header. At runtime, it must be loaded in the bootclass loader of the JVM [1]: java -Xbootclasspath/p: The jetty-spdy-server-http is the only module that depends on npn-api. At the moment, we chose to be flexible: the jetty-spdy-server-http lists an optional import for the package org.eclipse.jetty.npn We suspect it should not be listed in the OSGi manifest at all. Let us know how it goes. Hugues [1] http://wiki.eclipse.org/Jetty/Feature/NPN On Tue, Sep 25, 2012 at 2:17 PM, Hugues Malphettes wrote: > Hi Guofeng, > > We just updated the generation of the OSGi manifests for jetty-9. > > We have not tested SPDY in OSGi is still a work in progress. > > Regarding the npn library, it does not have an OSGi header. > At runtime, it must be loaded in the bootclass loader of the JVM [1]: > java -Xbootclasspath/p: > > We are completely decided what is the best way to handle this situation. > At the moment, we chose to be flexible: the jetty-spdy-server-http > lists an optional import for the package org.eclipse.jetty.npn We > think we should eventually not import it at all in OSGi. > > Let us know how it goes. > Hugues > [1] http://wiki.eclipse.org/Jetty/Feature/NPN > > On Tue, Sep 18, 2012 at 11:15 AM, Guofeng Zhang wrote: >> Hi, >> >> >> >> These days I learning how Jetty support SPDY. I found that spdy-core >> and spdy-jetty use the same package name. the SPDY modules and npn >> module has no OSGi headers defined. >> >> >> >> My question is: >> >> will these modules support OSGi in the future, and if so, is there >> not any issue for the split package in the OSGi environment? >> >> >> >> Thanks, >> >> >> >> Guofeng >> >> >> >> >> ___ >> jetty-users mailing list >> jetty-users@eclipse.org >> https://dev.eclipse.org/mailman/listinfo/jetty-users >> ___ jetty-users mailing list jetty-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/jetty-users ___ jetty-users mailing list jetty-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/jetty-users
[jetty-users] Implementing HTTP 1.1 encrypted connection upgrade
Hi. Following up on: http://jetty.4.n6.nabble.com/jetty-users-Jetty-and-Http-1-1-upgrade-header-td4959222.html I've tried to tell Jetty to use a SslConnection in order to upgrade the plain http connection to an encrypted connection. This is what I tried: --- // send 101 switching protocols response.setHeader("Upgrade", proto); response.setHeader("Connection", "Upgrade"); response.sendError(101, "Switching Protocols"); response.flushBuffer(); AbstractHttpConnection httpCon = AbstractHttpConnection.getCurrentConnection(); // prepare SslConnection SSLEngine engine = SSLContext.getDefault().createSSLEngine(); engine.setEnableSessionCreation(true); EndPoint httpEndPoint = httpCon.getEndPoint(); SslConnection connection = new SslConnection(engine, httpEndPoint); System.out.println(connection.toString()); // exchange connection request.setAttribute("org.eclipse.jetty.io.Connection", connection); --- When this is executed I'm seeing the following NullPointerException in log: SslConnection@63dc6270 SSL NOT_HANDSHAKING i/o/u=-1/-1/-1 ishut=false oshut=false {null} 2012-09-27 13:34:33.483:WARN:oeji.nio:handle failed java.lang.NullPointerException at org.eclipse.jetty.io.nio.SslConnection.handle(SslConnection.java:191) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:622) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538) at java.lang.Thread.run(Thread.java:722) Looking at the mention line in SslConnection: // handle the delegate connection AsyncConnection next = (AsyncConnection)_connection.handle(); And indeed _connection is null. What am I missing? Setting this "_connection" field could be done with: connection.getSslEndPoint().setConnection But which connection should be placed there? Regards, Manfred -- View this message in context: http://jetty.4.n6.nabble.com/Implementing-HTTP-1-1-encrypted-connection-upgrade-tp4959244.html Sent from the Jetty User mailing list archive at Nabble.com. ___ jetty-users mailing list jetty-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/jetty-users
[jetty-users] HTTP on LAN and redirect to HTTPS on WAN?
What's the simplest way to setup Jetty 8 to allow HTTP on LAN and redirect to HTTPS on WAN? I have the HTTPS working, but I need to know the easiest way to allow HTTP on LAN. final EnumSet dispatchers = EnumSet.range( DispatcherType.FORWARD, DispatcherType.ERROR); final ServletContextHandler context = new ServletContextHandler( ServletContextHandler.SESSIONS); context.setContextPath("/"); context.addFilter(GlobalFilter.class, "/*", dispatchers); context.addServlet(DefaultAppServlet.class, "/"); ___ jetty-users mailing list jetty-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/jetty-users
Re: [jetty-users] HTTP on LAN and redirect to HTTPS on WAN?
Looks like I'm close. I also want to be able to add authentication that will only apply to WAN use. Is there an easy way to do that? Authentication is set on the context which applies to both connectors. final SslSelectChannelConnector sslCnct = new SslSelectChannelConnector(sslCnxt); sslCnct.setPort(443); sslCnct.setHost("0.0.0.0"); final SelectChannelConnector httpCnct = new SelectChannelConnector(); httpCnct.setPort(80); httpCnct.setHost("127.0.0.1"); server.setConnectors(new Connector[] { httpCnct, sslCnct }); From: Will Hoover [mailto:java.whoo...@gmail.com] Sent: Thursday, September 27, 2012 10:32 AM To: 'jetty-users@eclipse.org' Subject: HTTP on LAN and redirect to HTTPS on WAN? What's the simplest way to setup Jetty 8 to allow HTTP on LAN and redirect to HTTPS on WAN? I have the HTTPS working, but I need to know the easiest way to allow HTTP on LAN. final EnumSet dispatchers = EnumSet.range( DispatcherType.FORWARD, DispatcherType.ERROR); final ServletContextHandler context = new ServletContextHandler( ServletContextHandler.SESSIONS); context.setContextPath("/"); context.addFilter(GlobalFilter.class, "/*", dispatchers); context.addServlet(DefaultAppServlet.class, "/"); ___ jetty-users mailing list jetty-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/jetty-users
Re: [jetty-users] SessionAuthentication class not found
Hello. If I change hazelcast AbstractSerializer.loadClass to use WebAppClassLoader.getParent to load SessionAuthentication everything works fine. Should hazelcast try WebAppClassLoader.getParent().loadClass for classes that are not found using WebAppClassLoader.loadClass. Seems wrong for me. Or am I not supposed to load the SessionAuthentication from the web app? I wonder if I am doing the wrong thing or if this should be fixed in hazelcast, my app or jetty. Regards, Tore Halset. On Sep 20, 2012, at 1:47 PM, Tore Halset wrote: > Hello. > > I am using jetty-distribution-8.1.2.v20120308 and hazelcast-2.3.1WebFilter > for session failover. > > During JAAS Form based authentication, we get the following error. However, > hazelcast are not able to load the Class for > org.eclipse.jetty.security.authentication.SessionAuthentication. > > Caused by: java.lang.ClassNotFoundException: > org.eclipse.jetty.security.authentication.SessionAuthentication > at java.net.URLClassLoader$1.run(URLClassLoader.java:202) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:190) > at > org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:415) > at > org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:377) > at > com.hazelcast.nio.AbstractSerializer.loadClass(AbstractSerializer.java:81) > > Does jetty somehow protect the security classes from being loaded from a web > app? > > Regards, > Tore Halset. > ___ > jetty-users mailing list > jetty-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/jetty-users > ___ jetty-users mailing list jetty-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/jetty-users