tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From raveendra <ravindra1...@gmail.com>
Subject HTTPConnector url redirection
Date Thu, 21 Aug 2008 13:47:27 GMT
Hi all,

    I am want to run my entire application on https which is developed using
struts2.So i configured my server.xml and web.xml as shown below.

server.xml--------
   <Connector port="8080" protocol="HTTP/1.1"
               maxThreads="150" connectionTimeout="20000"
               redirectPort="8443" />

     <Connector  port="8443" protocol="HTTP/1.1"
              minSpareThreads="5" maxSpareThreads="75"
              enableLookups="true" disableUploadTimeout="true"
              acceptCount="100" maxThreads="200"
              scheme="https" secure="true" SSLEnabled="true"
              keystoreFile="C:/Tomcat 6.0/conf/airo/.keystore"
keystorePass="mypassword"
              clientAuth="false" sslProtocol="SSL"/>

    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

web.xml----------
    <security-constraint>
        <web-resource-collection>
            <web-resource-name>ama</web-resource-name>
            <url-pattern>/*</url-pattern>
        </web-resource-collection>
        <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
    </security-constraint>

when i type url http://localhost:8080/myapp/start.action it is getting
redirected to https://localhost:8443/myapp/start.action.
But after accepting the certificate and loading the page.If i change my url
to http://localhost:8443/myapp/start.action just by removing 's' it is
loading the pages
with some GUI errors and after traversing couple of pages it is logging
out.I don't want it to happen.

When user remove 's' from url i want to redirect to same url with
https.Suppose if they remove 's' and it is
http://localhost:8080/myapp/start.action and load the page
i want it to redirected to https://localhost:8080/myapp/start.action.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message