How to ensure traffic on ssl port
<p>I am trying to redirect the traffic on non-SSL port 8080 to SSL port 8443( on Tomcat 7.0.67).Here is my configuration in server.xml file</p>

<p>for non-SSL HTTP/1.1 Connector on port 8080</p>

<pre><code>&lt;Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               URIEncoding="UTF-8"
               redirectPort="8443"
 /&gt;
</code></pre>

<p>and for SSL HTTP/1.1 Connector on port 8443</p>

<pre><code>&lt;Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               SSLEnabled="true"
               maxThreads="150" scheme="https" 
           secure="true"
               clientAuth="false" sslProtocol="TLS"
               keystoreFile="/home/girish/Desktop/keystore/mytomcat.cert" 
               keystorePass="tomcat"
  /&gt;
</code></pre>

<p>and security constraints in web.xml file of my project as </p>

<pre><code> &lt;security-constraint&gt;
      &lt;web-resource-collection&gt;
        &lt;web-resource-name&gt;matchstix&lt;/web-resource-name&gt;
        &lt;url-pattern&gt;/*&lt;/url-pattern&gt;      
      &lt;/web-resource-collection&gt;
      &lt;user-data-constraint&gt;
        &lt;transport-guarantee&gt;CONFIDENTIAL&lt;/transport-guarantee&gt;
      &lt;/user-data-constraint&gt;
    &lt;/security-constraint&gt;
</code></pre>

<p>my project have only web service (REST API). so i am using the postman-REST-Client to do the CURD operations, its working fine for https.</p>

<p>But How can i ensure that when i uses the non SSL port 8080 it redirect the request to SSL port ?</p>

<p>is there any way by ensuring that from <code>catalina.out</code> or any other log files of tomcat ?</p>