Well,
Because request.getRequestURI() returns full URI.
This will work:
StringBuffer loginpoint = new StringBuffer();
loginpoing.append(request.getScheme())
.append("://")
.append(request.getServerName())
.append("/mypage.jsp");
Or better use request.getRequestURI(), it will have
the URL value.
- John.
>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 2/12/01, 4:07:53 PM, "Melissa Matthews" <[EMAIL PROTECTED]> wrote
regarding Problem with request.getServerName in redirect:
> I am using Apache/Tomcat 3.2.1. When I use request.getServerName to
build
> the page for the redirect, the http:// is included in the server name.
> Why is this?
> This is the code I'm using:
> StringBuffer loginpoint = new StringBuffer();
> loginpoint.append(request.getScheme())
> .append("://")
> .append(request.getServerName())
> .append(request.getRequestURI());
> The problem is I end up with http://http://.....
> Any suggestions?
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
NOTICE: This communication may contain confidential or other privileged information.
If you are not the intended recipient, or believe that you have received this
communication in error, please do not print, copy, retransmit, disseminate, or
otherwise use the information. Also, please indicate to the sender that you have
received this email in error, and delete the copy you received. Any communication
that does not relate to official Columbia business is that of the sender and is
neither given nor endorsed by Columbia. Thank you.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]