You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tom Gilbert <to...@linuxbrit.co.uk> on 2001/02/14 13:12:33 UTC

request.getScheme() problem and virtual hosts

Hey,

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>
and
<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.

Tom.
-- 
   .^.    .-------------------------------------------------------.
   /V\    | Tom Gilbert, London, England | http://linuxbrit.co.uk |
 /(   )\  | Open Source hacker, advocate | tom@linuxbrit.co.uk    |
  ^^-^^   `-------------------------------------------------------'