You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Steve Mactaggart <sm...@303sport.com> on 2002/01/10 01:43:33 UTC

Problem with 3.3 and getServerName()

Hello all again,

	My SSL stuff is starting to work better, but I have problems creating the
new URL that the page is re-directed to.  I have code that looks like.

System.out.println("Redirecting to " + "https://"+req.getServerName()+
req.getRequestURI() + "?" + sbuf.toString());
 resp.sendRedirect("https://"+req.getServerName()+ req.getRequestURI()  |
"?" + sbuf.toString());

where sBuf is a set of query string parameters to return.

The problem is that the call to getServerName() returns "localhost" not
"dev1" which is the one that I am working on.  Is this a bug in 3.3 or am I
doing somthing wrong.

Also getRemoteAddr() also always returns "127.0.0.1" are these 2 related??

Any Ideas would be great.

--------------------------------
Steve Mactaggart
Senior Java Developer /
Team Leader

303 Sport
BH: 9620 7477
FAX 9620 7377
--------------------------------




--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>