You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Nibler Jeff R. (PDX1JRN)" <pd...@UPS.COM> on 2001/03/02 23:30:27 UTC
Relative Pathing and SSL
Hello all, I'm having an interesting problem persisting an SSL connection
with my Java servlets. I am using Windows NT/IIS with Tomcat acting only as
the servlet container (with the isapi_redirect.dll). Everything works fine
except when I need to re-direct a user from the servlet back to any other
page. When that happens, for some reason it sets the url to http instead of
https and then adds a colon with port 443 following the url (which is
obviously the port that it should be on, only automatically using the https
prefix).
Example:
Should be: https://www.myserver.com/Test.htm
Instead it gives: http:www.myserver.com:443/Test.htm
I have no idea why this is happening. I can't find any methods for the
HttpServletResponse object that allows me to set the communication protocol
etc etc. Here is the line of code that I'm using:
response.sendRedirect("../../Test.htm");
Notice I am using a relative path. If I use this instead.....
response.sendRedirect("https://www.myserver.com/Test.htm");
then it works. I hate to hard code the url like that though because I have
a development server and a production server. I'm at a loss. Anyone?
Jeff