tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lyallex <>
Subject Re: How to remove port number from https adress and redirect http to https
Date Fri, 06 Jul 2007 09:49:27 GMT

This is my first contribution to this list and I expect others will have
better ways of doing it but ...

The way I managed to get his working is to set the ssl connector port to the
default ssl port (443)
and my non-ssl connector port to the default http port (80)
Obviously there are issues starting Tomcat on these ports on *NIX systems
but judging by the following
entry in your ssl connector (keystoreFile="/root/.keystore") you appear to
have access to root.

That should do it

Also in my etc/hosts file I have set and my
app is the root web app

so now, combined with the following in web.xml


and a suitable servlet filter I can switch between http and https almost at
will with no messing about with ports just by asking for

Hope this helps


On 7/6/07, christianhau <> wrote:
> Hi!
> I have set up a tomcat server with ssl that works fine as long as I go to
> the adress https://adress:8443 I want to get rid of the port number, is
> there any easy way to do this so that tomcat understands the https request
> that comes in?
> <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
> maxThreads="150" scheme="https" secure="true"
> clientAuth="false" keystorePass="changeit" sslProtocol="TLS"
> keystoreFile="/root/.keystore"
> truststoreFile="/usr/lib/jvm/java-1.5.0-sun/jre/lib/security/cacerts" />
> This is my ssl connector in my server.xml. I tried getting a redirct from
> http to https going but couldn't do that in tomcat alone, any tips on that
> aswell? I have done this:
> <Connector port="8080" protocol="HTTP/1.1"
> redirectPort="8443" />
> With no luck... Thanks for any help!!
> --
> View this message in context:
> Sent from the Tomcat - User mailing list archive at
> ---------------------------------------------------------------------
> To start a new topic, e-mail:
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message