tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "roberto lo giacco" <rlogia...@e-tree.com>
Subject Re: Urgent send redirect
Date Tue, 07 May 2002 12:30:49 GMT
The API documentation says:

If the location is relative without a leading '/' the container 
interprets it as relative to the current request URI. If the location 
is relative with a leading '/' the container interprets it as relative 
to the servlet container root. 

I think you have to use the sendRedirect method with something 
like "http://" + url + '?' + queryString to obtain what you are asking 
for...

Roberto

----- Original Message -----
From: Laura <lauradiara@libero.it>
Date: Tuesday, May 7, 2002 12:52 pm
Subject: Urgent send redirect

> Hi all,
> 
> I have a problem and I don't know whre is the cause.
> 
> My context is /xxx: in this context I have a servlet. This servlet 
> takesas 
> parametr an url in IP form (nn1.nn2.nn3.nn4).
> At the end of the servlet I do:
> 
> response.sendRedirect(response.encodeRedirectURL(url + "?" + 
> querystring));
> If the url parameter,passed to my servlet is nn1.nn2.nn3.nn4, the 
> browser of 
> the user is redirected to
> 
> 
> http://myserver/xxx/nn1.nn2.nn3.nn4?querystring
> 
> But I want:
> 
> http://nn1.nn2.nn3.nn4?querystring
> 
> 
> Where is my problem?
> 
> Please help me.
> 
> 
> 
> Thanks
> 
> Laura
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-
> unsubscribe@jakarta.apache.org>For additional commands, e-mail: 
> <mailto:tomcat-user-help@jakarta.apache.org>
> 
> 


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


Mime
View raw message