Bind Jetty to IPv6 address

自古美人都是妖i 提交于 2019-12-02 00:12:18

If you haven't found a solution, here it is. Change the NIO connector with the IO one. Instead of using "org.mortbay.jetty.nio.SelectChannelConnector" use "org.mortbay.jetty.bio.SocketConnector" and the overall connector config will be:

<Call name="addConnector">
  <Arg>
      <New class="org.mortbay.jetty.bio.SocketConnector">
        <Set name="port"><SystemProperty name="jetty.port" default="8070"/></Set>
        <Set name="maxIdleTime">50000</Set>
        <Set name="lowResourceMaxIdleTime">1500</Set>
      </New>
  </Arg>
</Call>

This way you will be able to access the webpage using both IPv4 and IPv6 address. Hope this helps.

Old versions of the Sun JRE do not support IPv6 on NIO channels, so simply upgrade the JVM.

http://bugs.sun.com/view_bug.do?bug_id=6230761

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!