| Author |
Server Name and URL
|
Sahil Sharma
Ranch Hand
Joined: Aug 27, 2003
Posts: 152
|
|
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
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
|
How is the server implemented ? Is it a servlet?
|
Groovy
|
 |
Sahil Sharma
Ranch Hand
Joined: Aug 27, 2003
Posts: 152
|
|
|
thats correct.
|
 |
Pradeep bhatt
Ranch Hand
Joined: Feb 27, 2002
Posts: 8876
|
|
Use the getRemoteAddr() of the HttpServletRequest interface. http://java.sun.com/webservices/docs/1.4/api/javax/servlet/http/HttpServletRequest.html
|
 |
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
|
|
|
Moving to Servlet forum...
|
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
|
 |
James Carman
Ranch Hand
Joined: Feb 20, 2001
Posts: 580
|
|
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"?
|
James Carman, President<br />Carman Consulting, Inc.
|
 |
vasu devan
Ranch Hand
Joined: Apr 14, 2005
Posts: 38
|
|
hi.. use getHostName() or getRequestURL() in http.servlet.http.HttpServletRequest object cheers vasu
|
 |
 |
|
|
subject: Server Name and URL
|
|
|