[Logo]
Forums Register Login
Server Name and URL
Hi all,

Small question I have.
If the link to my application is on four different portals, Then how can i
know in my application where the request has come from?I need to get the
server name and URL of the application from which my application was
requested.

Thanx
How is the server implemented ? Is it a servlet?
thats correct.
Use the getRemoteAddr() of the HttpServletRequest interface.
http://java.sun.com/webservices/docs/1.4/api/javax/servlet/http/HttpServletRequest.html
Moving to Servlet forum...
 

Originally posted by Sahil Sharma:
Hi all,

Small question I have.
If the link to my application is on four different portals, Then how can i
know in my application where the request has come from?I need to get the
server name and URL of the application from which my application was
requested.

Thanx



Are you looking for something like a "referrer"?
hi..

use getHostName() or getRequestURL() in http.servlet.http.HttpServletRequest object

cheers
vasu
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards


This thread has been viewed 708 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jun 21, 2018 14:07:13.