I found the problem...

Put the following somewhere in your code 
System.setProperty("java.protocol.handler.pkgs",
"com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


http redirects now work. Maybe these packages should be installed by default
seen as Tomcat supports HTTP. 
Maybe there is an easier way??

Donie



 -----Original Message-----
From:   Donie Kelly [mailto:[EMAIL PROTECTED]] 
Sent:   12 June 2002 16:44

Subject:        RE: Tomcat not redirecting request from HTTP to HTTPS

I'm using tomcat standalone. I can access the /info resource over https but
when I access it over http I get the error. I wan the http request to
automatically transfer over automatically to https.

In the servlet specs it says that the switch over is automatic. I think
that's where I read it anyway...
Thanks
Donie


 -----Original Message-----
From:   Turner, John [mailto:[EMAIL PROTECTED]] 
Sent:   12 June 2002 16:43
To:     'Tomcat Users List'
Subject:        RE: Tomcat not redirecting request from HTTP to HTTPS


An "HTTP 500 Internal Server" error is usually from the web server, not from
Tomcat.  Are you sure your Apache SSL configuration is correct?  Is mod_ssl
included and available?

John Turner
[EMAIL PROTECTED]
http://www.aas.com


-----Original Message-----
From: Donie Kelly [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 11:36 AM
To: 'Tomcat Users List'
Subject: Tomcat not redirecting request from HTTP to HTTPS


Hi all 

Here is my server.xml and web.xml. When I request the page at /info I
expected the page to requested over SSL but it returns HTTP 500 Internal
server error

Why is this?


Web.xml

  <servlet>
        <servlet-name>info</servlet-name>
        <jsp-file>/onm/index.jsp</jsp-file>
  </servlet>

  <servlet-mapping>
        <servlet-name>info</servlet-name>
        <url-pattern>/info</url-pattern>
  </servlet-mapping>

  <security-constraint>
      <web-resource-collection>
          <web-resource-name>secure</web-resource-name>
          <url-pattern>/info</url-pattern>
      </web-resource-collection>

      <user-data-constraint>
          <transport-guarantee>CONFIDENTIAL</transport-guarantee>
          </user-data-constraint>
  </security-constraint>

server.xml

  <Service name="Tomcat-Standalone">

    <!-- Define an SSL HTTP/1.1 Connector on port 443 -->
    <Connector className="org.apache.catalina.connector.http.HttpConnector"
                        port="443" minProcessors="5" maxProcessors="75"
                        enableLookups="true"
                        acceptCount="10" debug="0" scheme="https"
secure="true">
                <Factory
className="org.apache.catalina.net.SSLServerSocketFactory"
                        clientAuth="false" protocol="TLS"
                        keystoreFile="c:\tomcat4.0\.keystore"
                        keystorePass="changit"
             />
    </Connector>

    <!-- Define a non-SSL HTTP/1.1 Connector on port 80 -->
    <Connector className="org.apache.catalina.connector.http.HttpConnector"
                        port="80" minProcessors="5" maxProcessors="75"
                        enableLookups="false"
                        redirectPort="443" acceptCount="10" debug="0"
connectionTimeout="60000"
                        allowChunking="false"/>

    <Engine name="Standalone" defaultHost="localhost" debug="0">
      <Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt" timestamp="true"/>
      <Realm className="org.apache.catalina.realm.MemoryRealm" />
          <Host name="localhost" debug="0" appBase="webapps"
unpackWARs="false">

                <Context path=""
docBase="c:\mmsdev\dev\mms\webapps\mms"></Context>
      <Context path="/images"
docBase="c:\mmsdev\dev\mms\webapps\mms\onm\images"></Context>
              <Context path="/tp"
docBase="c:\mmsdev\dev\mms\webapps\tp"></Context>
        </Host>
    </Engine>
  </Service>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to