Link to home
Start Free TrialLog in
Avatar of Asheesh_Kumar
Asheesh_Kumar

asked on

how to get the server information(IP,PortNumber) from the URL(http request)

HI,

I am working on java/j2ee(struts) based application;
I need to know the server infromaton(IP/Port Number) from the URL.
I created a hyperLink  to acees  my application on some other application.
I want to know server information(on which I created  the hyperLInk to access my application) from the URL that I used to create the hyperLink to access my application.
This I want to make sure that weather user access my application via the hyperLink or directly(that I don't want to allow)
ASKER CERTIFIED SOLUTION
Avatar of krishna kishore mellacheruvu venkata
krishna kishore mellacheruvu venkata
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Asheesh_Kumar
Asheesh_Kumar

ASKER

I am using request.getHeader("referer");
that returing me the referer name(if the referer name have the information about the server where II created the hyperlink to access my application). it means user access my application using the hyperlink not direclty(i.e giving the url on browser to access my application)..