<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 11, 2015, at 11:09 AM, jorge lima &lt;<a href="mailto:jorge.ayala2012@gmail.com" class="">jorge.ayala2012@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class="">Hi,</div><div class=""><br class=""></div><div class="">now I think I'm almost there, when I run my project, it appears this message on console:</div><div class=""><br class=""></div><div class=""><b class="">nov 11, 2015 1:48:07 PM com.squareup.okhttp.internal.Platform$JdkWithJettyBootPlatform getSelectedProtocol</b></div><div class=""><b class=""><br class=""></b></div><div class=""><b class="">INFO: ALPN callback dropped: SPDY and HTTP/2 are disabled. Is alpn-boot on the boot class path?</b></div><div class=""><br class=""></div><div class="">I've tryed to enable the alpn-boot using the command shown on eclipse jetty website:</div><div class=""><br class=""></div><div class=""><br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">java -Xbootclasspath/p:&lt;path_to_alpn_boot_jar&gt; ...</blockquote><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Then I goes to my cmd, used the command 'cd &lt;path&gt;' to go to my Java Project and used the following:</div><div class=""><br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">&nbsp;java -Xbootclasspath/p:/libs/alpn-boot-8.1.6.v20151105.jar ...&nbsp;</blockquote><div class=""><br class=""></div><div class="">So it always print a help list, doesn't execute nothing for real, then I've tried this:</div><div class=""><br class=""></div><div class="">&nbsp; java -Xbootclasspath/p:/libs/alpn-boot-8.1.6.v20151105.jar Test.class</div></div></div></div></blockquote><div><br class=""></div><div>The … means “insert your normal JVM arguments here”</div><div><br class=""></div><div>Assuming that Test.class is in the default package, and &nbsp;in your current directory you would do:</div><div><br class=""></div><div>&nbsp;java -Xbootclasspath/p:/libs/alpn-boot-8.1.6.v20151105.jar Test</div><div><br class=""></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class=""><br class=""></div><div class="">Where this class have a main method and prints: 'Error: Could not find or load main class Test.class'</div><div class=""><br class=""></div><div class="">I've tested some things that took me hours to have nothing. Why they put this '...' on their command if they even explain very well how to do, I'm lost here, sadly.</div><div class=""><br class=""></div><div class="">Do you have some clear example how I have to do to activate the alpn-boot on my boot class path? I would thank you so much man...</div><div class=""><br class="">2015-11-10 16:06 GMT-03:00 Jason Greene <span dir="ltr" class="">&lt;<a href="mailto:jason.greene@redhat.com" target="_blank" class="">jason.greene@redhat.com</a>&gt;</span>:<br class=""></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word" class="">The ALPN jars are on maven central here:<div class=""><br class=""></div><div class=""><a href="https://repo1.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/" target="_blank" class="">https://repo1.maven.org/maven2/org/mortbay/jetty/alpn/alpn-boot/</a></div><div class=""><br class=""></div><div class="">You have to match the specific version for the JDK version that you use, which is documented on the alpa-chapter you linked.</div><div class=""><div class=""><div class="h5"><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Nov 10, 2015, at 11:52 AM, jorge lima &lt;<a href="mailto:jorge.ayala2012@gmail.com" target="_blank" class="">jorge.ayala2012@gmail.com</a>&gt; wrote:</div><br class=""><div class=""><div dir="ltr" class="">Hi,<br class=""><br class="">thanks for the answer again, I'm using now this okhttp and looks very good for me, the problem is that I need to know how to set the proper ALPN boot jar in the bootclasspath (Jetty), I'm having troubles: <br class=""><div style="font-size:12.8px" class=""><span style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:19.5px" class=""><br class=""></span></div><div style="font-size:12.8px" class=""><span style="font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace;font-size:13.3333px;white-space:pre-wrap;background-color:rgb(238,238,238)" class="">java -Xbootclasspath/p:&lt;path_to_alpn_boot_jar&gt; ...</span></div><div style="font-size:12.8px" class=""><span style="font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace;font-size:13.3333px;white-space:pre-wrap;background-color:rgb(238,238,238)" class=""><br class=""></span></div>How I'm gonna put a path to alpn boot jar if I don't have any?<div class=""><br class=""></div><div class="">Here is the link:</div><div class=""><br class=""></div><div class=""><a href="https://www.eclipse.org/jetty/documentation/current/alpn-chapter.html" target="_blank" class="">https://www.eclipse.org/jetty/documentation/current/alpn-chapter.html</a></div><div class=""><br class=""></div><div class="">If you could help me I would appreciate.<br class=""><div style="font-size:12.8px" class=""><span style="font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace;font-size:13.3333px;white-space:pre-wrap;background-color:rgb(238,238,238)" class=""><br class=""></span></div><div style="font-size:12.8px" class=""><span style="font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace;font-size:13.3333px;white-space:pre-wrap;background-color:rgb(238,238,238)" class=""><br class=""></span></div></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">2015-11-10 7:34 GMT-03:00 Tomaž Cerar <span dir="ltr" class="">&lt;<a href="mailto:tomaz.cerar@gmail.com" target="_blank" class="">tomaz.cerar@gmail.com</a>&gt;</span>:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class=""><div class="">First you will need client api that knows how to handle HTTP2.<br class=""><br class=""></div>java's URL/URI currently don't support http2 at all.<br class=""></div>There is JEP <a href="http://openjdk.java.net/jeps/110" target="_blank" class="">http://openjdk.java.net/jeps/110</a> to add support for it in JDK 9.<br class=""><br class=""></div>AFAK at the moment only <a href="https://github.com/square/okhttp" target="_blank" class="">https://github.com/square/okhttp</a> client properly supports http2.<br class=""></div>But there is lots of development going on around this topic, best to look the internet <br class="">for solution that suits you best.<br class=""><br class="">--<br class=""></div>tomaz<br class=""><div class=""><div class=""><div class=""><div class=""><br class=""><br class=""></div></div></div></div></div><div class=""><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Nov 9, 2015 at 9:12 PM, jorge lima <span dir="ltr" class="">&lt;<a href="mailto:jorge.ayala2012@gmail.com" target="_blank" class="">jorge.ayala2012@gmail.com</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr" class="">Hi,<div class=""><br class=""></div><div class="">thanks for the answer. But what I really need to know is to discover if some website uses HTTP/2 or not, like how we use in URLConnection with Java:</div><div class=""><br class=""></div><div class="">URL url = new URL("<a href="https://developer.jboss.org/" target="_blank" class="">https://developer.jboss.org/</a>");</div><div class=""><div class="">Map&lt;String, List&lt;String&gt;&gt; map = new HashMap&lt;&gt;();</div><div class="">URL obj = new URL(url.toString());<br class=""></div><div class="">URLConnection conn = obj.openConnection();</div><div class="">map = conn.getHeaderFields();</div></div><div class="">...</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Thanks again!</div></div><div class=""><div class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">2015-11-09 16:51 GMT-03:00 Tomaž Cerar <span dir="ltr" class="">&lt;<a href="mailto:tomaz.cerar@gmail.com" target="_blank" class="">tomaz.cerar@gmail.com</a>&gt;</span>:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class="">It is not just http/2 header :)<br class=""><br class=""></div>but yes, undertow supports it, to enable it you will need to upgrade to Java 8 and do some additional setup.<br class=""><br class=""></div>see <a href="https://developer.jboss.org/message/929048" target="_blank" class="">https://developer.jboss.org/message/929048</a><br class=""><a href="http://undertow.io/blog/2015/03/26/HTTP2-In-Wildfly.html" target="_blank" class="">http://undertow.io/blog/2015/03/26/HTTP2-In-Wildfly.html</a><br class=""><br class=""></div>for how to setup it.<br class=""><br class="">--<br class=""></div>tomaz<br class=""><div class=""><div class=""><div class=""><br class=""></div></div></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote"><span class="">On Mon, Nov 9, 2015 at 6:15 PM, jorge lima <span dir="ltr" class="">&lt;<a href="mailto:jorge.ayala2012@gmail.com" target="_blank" class="">jorge.ayala2012@gmail.com</a>&gt;</span> wrote:<br class=""></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class=""><div dir="ltr" class=""><div class=""><span style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:19.5px" class="">Hi,</span></div><span style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:19.5px" class=""><div class=""><span style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:19.5px" class=""><br class=""></span></div>Is there already a way to get the HTTP/2 response header in Java using Undertow? I really need to know. I'm using JDK 7 on my Java Project. Thank you very much!</span><br class=""></div>
<br class=""></span>_______________________________________________<br class="">
undertow-dev mailing list<br class="">
<a href="mailto:undertow-dev@lists.jboss.org" target="_blank" class="">undertow-dev@lists.jboss.org</a><br class="">
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank" class="">https://lists.jboss.org/mailman/listinfo/undertow-dev</a><br class=""></blockquote></div><br class=""></div>
</blockquote></div><br class=""></div>
</div></div></blockquote></div><br class=""></div>
</div></div></blockquote></div><br class=""></div>
_______________________________________________<br class="">undertow-dev mailing list<br class=""><a href="mailto:undertow-dev@lists.jboss.org" target="_blank" class="">undertow-dev@lists.jboss.org</a><br class=""><a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" target="_blank" class="">https://lists.jboss.org/mailman/listinfo/undertow-dev</a></div></blockquote></div><br class=""></div></div><div class="">
--<br class="">Jason T. Greene<br class="">WildFly Lead / JBoss EAP Platform Architect<br class="">JBoss, a division of Red Hat

</div>
<br class=""></div></div></blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""><div class="">
--<br class="">Jason T. Greene<br class="">WildFly Lead / JBoss EAP Platform Architect<br class="">JBoss, a division of Red Hat

</div>
<br class=""></body></html>