tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefán F. Stefánsson <stef...@snote.decode.is>
Subject RE: Relative Pathing and SSL
Date Fri, 02 Mar 2001 23:17:51 GMT
I don't know if this works with isapi also but try to set the parameter
"secure" with the value "true" in your connector tag in server.xml.
What version of tomcat are you using?

Regards, Stefan.

-----Original Message-----
From: Nibler Jeff R. (PDX1JRN) [mailto:pdx1jrn@UPS.COM]
Sent: 2. mars 2001 22:30
To: tomcat-user@jakarta.apache.org
Subject: 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

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message