Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can use Maven to create a development certificate and use it when starting Jetty. First, configure the <em>keytool-maven-plugin</em> to create a development certificate:</p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt; &lt;artifactId&gt;keytool-maven-plugin&lt;/artifactId&gt; &lt;executions&gt; &lt;execution&gt; &lt;phase&gt;generate-resources&lt;/phase&gt; &lt;id&gt;clean&lt;/id&gt; &lt;goals&gt; &lt;goal&gt;clean&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;execution&gt; &lt;phase&gt;generate-resources&lt;/phase&gt; &lt;id&gt;genkey&lt;/id&gt; &lt;goals&gt; &lt;goal&gt;genkey&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;configuration&gt; &lt;keystore&gt;${project.build.directory}/jetty-ssl.keystore&lt;/keystore&gt; &lt;dname&gt;cn=my.hostname.tld&lt;/dname&gt;&lt;!-- put your CN here--&gt; &lt;keypass&gt;jetty6&lt;/keypass&gt; &lt;storepass&gt;jetty6&lt;/storepass&gt; &lt;alias&gt;jetty6&lt;/alias&gt; &lt;keyalg&gt;RSA&lt;/keyalg&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>Change the CN as you wish. Then configure the <em>maven-jetty-plugin</em> to use the development certificate:</p> <pre><code>&lt;plugin&gt; &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt; &lt;artifactId&gt;maven-jetty-plugin&lt;/artifactId&gt; &lt;version&gt;6.1.10&lt;/version&gt; &lt;configuration&gt; &lt;contextPath&gt;/context&lt;/contextPath&gt; &lt;scanIntervalSeconds&gt;5&lt;/scanIntervalSeconds&gt; &lt;connectors&gt; &lt;connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"&gt; &lt;port&gt;8080&lt;/port&gt; &lt;maxIdleTime&gt;60000&lt;/maxIdleTime&gt; &lt;/connector&gt; &lt;connector implementation="org.mortbay.jetty.security.SslSocketConnector"&gt; &lt;port&gt;8443&lt;/port&gt; &lt;maxIdleTime&gt;60000&lt;/maxIdleTime&gt; &lt;keystore&gt;${project.build.directory}/jetty-ssl.keystore&lt;/keystore&gt; &lt;password&gt;jetty6&lt;/password&gt; &lt;keyPassword&gt;jetty6&lt;/keyPassword&gt; &lt;/connector&gt; &lt;/connectors&gt; &lt;/configuration&gt; &lt;/plugin&gt; </code></pre> <p>Run <code>mvn jetty:run</code> and open <a href="https://localhost:8443/context" rel="noreferrer">https://localhost:8443/context</a>.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload