Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Tomcat ssl/https: error 302 when accessing servlet with https

Greg Brownell

2007-02-16

Replies:

Hello,

I have several servlets that are accessed via https. I am using tomcat
5.5.20

server.xml has the following entries:

 <!-- Define a non-SSL HTTP/1.1 Connector on port (8080 changed to
9123 -->
 <Connector port="80" maxHttpHeaderSize="8192"
        maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
        enableLookups="false" redirectPort="443" acceptCount="100"
        connectionTimeout="20000" disableUploadTimeout="true" />

 <!-- Define a SSL HTTP/1.1 Connector on port 443 -->
 <Connector port="443" maxHttpHeaderSize="8192"
      maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
      enableLookups="false" disableUploadTimeout="true"
      acceptCount="100" scheme="https" secure="true"
      keystoreFile="/etc/.keystore"
      keystorePass="abcdefg"
      clientAuth="false" sslProtocol="TLS" />

web.xml has the following entries:

 <!-- Security roles referenced by this web application -->
 <security-role>
  <role-name>role1</role-name>
 </security-role>
 <security-role>
  <role-name>tomcat</role-name>
 </security-role>

<security-constraint>
  <web-resource-collection>
    <web-resource-name>secure pages</web-resource-name>
    <url-pattern>/fileview</url-pattern>
  </web-resource-collection>
  <web-resource-collection>
    <web-resource-name>secure pages</web-resource-name>
    <url-pattern>/vconfirm_n</url-pattern>
  </web-resource-collection>
  <web-resource-collection>
    <web-resource-name>secure pages</web-resource-name>
    <url-pattern>/vconfirm</url-pattern>
  </web-resource-collection>
  <user-data-constraint>
    <transport-guarantee>CONFIDENTIAL</transport-guarantee>
  </user-data-constraint>
</security-constraint>


The server starts without error. All of my applications run as
expected. However, I am unable to access any of the servlets identified
in the security restraints above.

https://www.<domain name>/fileview?id=xxxxx


Accessing the above through Firefox simply says connection timed out
(after a long wait). Error log generates the following:

xx.xx.xx.xx - - [16/Feb/2007:15:25:29 -0500] "GET /fileview?id=1xxx
HTTP/1.1" 302 -

I don't understand the 302 status code (if that's what it is). The
servlet "fileview" is in WEB-INF/classes

Any help figuring this out would be appreciated.

Thanks much.

Greg Brownell



---------------------------------------------------------------------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.