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

</div>
<br></div></div></blockquote></div><br></div></div>