request.getHeader("host") should tell you what the user's browser called you.
Jan Kester wrote: >Hello > >I am using Tomcat 3.3. I am communicating with an external server and pass >this server a return-redirect-URL so that the end of the process, the >external server returns a page to the user that automatically redirects to >my server. From here on the user should continue with the session as he had >it before. Session is maintained in cookie and to make use of the same >cookie it is important that the URL has exactly the same form >protocol://host.domain:port/context as before. So for instance a second call >to port 80 explicitly and a first to port 80 implied already generates >different cookies, thus loosing sessions. A same problem happens with first >calling my server by IP, and then call my server by servername. The cookies >are different so I loose my session. So at the moment of generating my >return-redirect-URL I need to know exactly where I am. How do I know whether >my URL has been called by servername or by ip? >I tried HttpUtils.getURLRequest but that always returns servername. I tried >to look at the session cookie getDomain(), but that returns null. I see no >way to find out whether I was called by IP or by servername ... >Anyone knows how to do the trick? > >Regards, Jan > >Jan Kester >Marlborough Stirling España, S.L. Director de Informática >Gran Vía 62, 10º izq >28013 Madrid >tel: +34-91-5487910 >fax: +34-91-5400199 >email: [EMAIL PROTECTED] > > >-- >To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> >For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> > > > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>