tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Gilbert <>
Subject request.getScheme() problem and virtual hosts
Date Wed, 14 Feb 2001 12:12:33 GMT

I have two problems, one seems to be a bug in request.getScheme(). It
always returns "https", no matter whether I am viewing a page with http
or https. This is a problem due to my second issue.

I need to do virtual hosts based on port. I do this on apache like so:
<VirtualHost _default_:80>
<VirtualHost _default_:443>

I want to make an alias change between the two hosts so that SSI (for
the static pages) and the <jsp:include>s in the jsp content change
depending on whether you are using SSL or not.

This works fine with apache and SSI, but I am unable to make it work for
tomcat, the <Host> facility in server.xml doesn't seem to allow for
ports. I have tried many combinations here.

My backup, to do an if() on request.getScheme and show the relavent
content, doesn't work because request.getScheme() always returns https.

This is with tomcat-3.2, any help would be appreciated.

   .^.    .-------------------------------------------------------.
   /V\    | Tom Gilbert, London, England | |
 /(   )\  | Open Source hacker, advocate |    |
  ^^-^^   `-------------------------------------------------------'

View raw message