On Thu, 5 Apr 2001, Milt Epstein wrote:

> On Thu, 5 Apr 2001, Alvin Yap wrote:
> 
> > I running Tomcat as a standalone using SSL.
> > What i'm hoping to do is that one context with non-SSL and the other
> > context is with SSL.
> 
> Well, that helps clarify the question.  Unfortunately, I don't have an
> answer for you (i.e. I don't know) -- but perhaps someone else does.
> This is certainly a very reasonable/desirable capability to have, so
> if it's not available, it would be nice if it were added.  FWIW, I'm
> pretty sure you can do what you want with Apache with mod_ssl (which
> is what I'm using -- but I haven't tried doing that yet).
> 
> 

The simplest thing to do is set up the *same* webapp(s) to be accessible
via both SSL and non-SSL.  All it takes to do this is to uncomment the SSL
connector entry in conf/server.xml and customize the appropriate
properties.

If you really want the sets of web apps available via SSL and non-SSL
connections to be separate, that can be done as well -- by using more than
one <Service> element in your web.xml file, like this:

<Server port="8005" ...>


  <Service name="SSL Service">
    <Connector ... define the SSL connector ... />
    <Engine ...>
      <Host ...>          <!-- One per virtual host -->
        <Context .../>    <!-- One per web app -->
      </Host>
    </Engine>
  </Service>

  <Service name="Non-SSL Service">
    <Connector ... define the non-SSL connector ... />
    <Engine ...>
      <Host ...>          <!-- One per virtual host -->
        <Context .../>    <!-- One per web app -->
      </Host>
    </Engine>
  </Service>

</Server>

The details for the properties of these elements can be found in the
Tomcat 4.0 configuration information, at:

        http://localhost:8080/docs/config

Craig McClanahan

Reply via email to