Getting client hostname
Hi, I am developing a web application, and It is needed to get the remote hostname that is submitting a form. The IP address is not helpful because the network where is going to be implemented uses DHCP and the hostnames are registered in the database. I have used request.getRemoteHost and the class InetAddress and its method getHostName, but the first always returns the IP, and the second not always returns the hostname.
Any Idea, (even if someone knows how to get fhis through JavaScript, or VBScript or anyway)
Thanks a lot.
This is indeed not always possible through the ServletRequest. It would cost one DNS lookup, which might take a long time.
The InetAddress API ought to be sufficient: http://java.sun.com/j2se/1.5.0/docs/api/java/net/InetAddress.html
InetAddress inetAddress = InetAddress.getByName("127.0.0.1");
String hostName = inetAddress.getHostName();It lookups the hostname through the DNS as specified on the local machine. If a hostname isn't being resolved correctly, then you may change the DNS server setting.
Similar Messages
-
Router reports garbage characters for Mac's DHCP client hostname
I've got a Linksys wifi router giving nice wireless access to my 17" powerbook (OSX 10.3.9). But when I look at the DHCP active IP table, this one (and another Mac I have on the network) both show up with garbage characters on the "client hostname" even though I have the "DHCP client Id" field filled in in the Network, TCP/IP system preference pane. How do I get the router to see my client's name?
MikeMight help if you told us what the "garbage" was. It
might help indentify what it relates to because it's
highly unlikely to be truly random. It's more likely
to be based on the client's MAC address.
ok. It is, exactly: ¸#Єª
In any case, DHCP client ID and hostname are not
related, so you might be out of luck depending on
what the Linksys is doing.
ah! Sorry - I thought that's what it wanted. So, where on my machine do I set the client hostname? Where does a router grab this info from? I've got a PC connected to this thing which does report its name correctly.
Thanks,
Mike -
How to get client machine name and IP address
Hi,
In my office I have one SERVER which has FORMS & Report Server installed and all the clients are accessing that application thru the following URL :
http://OraServer:8889/forms/frmservlet
to get the machine name I have read into a global variable like this
SELECT USERENV('TERMINAL' ) into :global.clientname FROM DUAL;
but obviously all the time its returning the SERVER machine name...not the name where client is accessing the program....so how can I get the client machine name..
thanksHi Frank,
Well I am using Developer Suite 10g Release (10.1.2.0.2) ..I've gone thru the link what you have sent me and noticed that whatever updations of conf file or classpath its already there so i guess needn't to modify cause I think my release 10.1.2.0.2 has did already as webutils been bundled with it.
Well What i did is to double click on ATTACH LIBRARY and browse the location to find webutil.pll and finally attached it...even though its showing me all the procedures like clientinfo and others...
on my block's canvas I've put a button and used this trigger to get client info function like this.
when-button-pressed trigger of INFOBUTTON
DECLARE
o_clientinfo varchar2(50) := Webutil_clientinfo.GET_HOST_NAME ;
begin
message(o_clientinfo);
end;
but when I am trying to open this form its simply not showing up..strange thing is that there is no error as well...so plz kindly guide me how to get clientinfo hostname or ipaddress using that library function.
thanks -
Dear Experts,
I am using
String ipAddress = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getClientHostAddress();
retrieve client ip address.
When I use getClientHostName(), it still present client ip address.
Regarding the client hostname, how do I get it?
thank you.
Regards,
WengUse this
String hostName = WDProtocolAdapter.getProtocolAdapter().
getRequestObject().getClientHostName();
You also have one more method to get IP address.
String Address = WDProtocolAdapter.getProtocolAdapter().
getRequestObject().getClientHostAddress() ;
for more check this forum link
How to get the system name of the client?
thanks -
How to specify "client hostname" so that my router knows it?
I've got a Linksys wifi router giving nice wireless access to my 17" powerbook (OSX 10.3.9). But when I look at the DHCP active IP table, this one (and another Mac I have on the network) both show up with garbage characters on the "client hostname" even though I have the "DHCP client Id" field filled in in the Network, TCP/IP system preference pane. How do I get the router to see my client's name?
MikeIn "Sys. Prefs. -> Network -> Airport -> TCP/IP" there's a text field where you can specify a "DHCP Client ID". You might try adding the name you'd like to see in there. You may have to do a "Renew Lease" or disconnect/reconnect to the router to get the client ID to be passed to the router.
However, on my machine the "DHCP client ID" field is left blank and my NetGear wireless router shows the same client name that I've set up in "Sys. Prefs. -> Sharing"... so I guess "your mileage may vary" for different routers...
Steve -
Need ASA DHCPD log with client hostname
I recently switched from a Linux DHCP server to using DHCPD configuration on Cisco ASA 8.4 code. With the Linux DHCP servers, the logs showed the hostname of the requesting DHCP client. Unfortunately, I'm not seeing the hostname information in the DHCPD logs from the ASA. How can I get the ASA to log the clients' hostname?
ThanksI've got the Cisco VPN client 5.x setup with connection profile to Tunnel Group name and pre-shared key.
Client is communicating with the ASA and is getting prompted for user login. I have the ASA configured for aaa radius authentication to MS IAS on Windows 2003K server. Experimenting on the IAS side between the IAS config "connection policies" and AD user profile. I can now assign a static IP address to the remote VPN client which is nice! This can be done two ways... either in IAS connection profile or in AD user profile. What I'm working on next is having the IAS server pass back to the ASA (radius client) a acl list # (filter.id = 80.id) where I have an access-list 80 statement defined. Not finished up with setup. Any advice/input on this piece would be helpful.
The basic goals of this exercise/project include:
1. Remote Cisco VPN users authenticating with AD.
2. Pre-configured .pcf file created and deployed to remote users.
3. Unique static IP's assigned to all VPN users for audit purposes (or troubleshooting).
4. Apply ACL's to VPN users based on their assigned static IP so I can control what subnet's/IP's they can reach.
So far so go... We are a month or so away from implementing our first Windows 2008 server, so I'm fine with getting this to work for our 20-30 remote users with IAS in Win2Kserver environment while I get educated on NSP.
Joe -
How to get client IP in custom UCM Service
how to get client IP in custom UCM Service ?
have you tried
binder.getLocal("REMOTE_ADDR");
Let us know how you get on
Tim -
How to get system Hostname in java
Hi,
I am a java developer trying to get the hostname of the system from java class. Meaning want the value when i run the $hostname command in linux and my server is Linux server.
I am searching in the System Properties for the hostname but i could not get it
I am running IBM Websphere 5.2 and JDK 1.4.2 in my linux server.
Thanks for input
-APTry
package testing;
import java.net.*;
public class Test
public static void main(String[] args) throws UnknownHostException
System.out.println(InetAddress.getLocalHost().getHostName());
} -
Hey one question, if i buy an Ipod in Germany, can i get client support in Mexico?
if i buy an ipod in germany, can i get client support in mexico?
https://www.apple.com/legal/warranty/
-
How can I get Client IP Address in oracle?senthil
How can I get Client IP Address in oracle?senthil
Hi,
Following query can help you to get the Client IP Address.
select sys_context('userenv','ip_address') from dual;
Thanks, -
How can I get client IP address in portlet (servlet) ?
How can I get client IP address in portlet (servlet) ?
request.getRemoteAddr() return server IP.
May be I must use Portal API, which extend Servlet classes, but I can't find this.
Can any help me?Hi,
Following query can help you to get the Client IP Address.
select sys_context('userenv','ip_address') from dual;
Thanks, -
How to get Client IP address in oracle apps. Are there any API's.
hi,
I have one query
->How to get Client IP address in oracle apps. Are there any API's.
regards,
krishnaHi,
this is very usefull
however are this data stored on the db or is only a temporary view?
I would like to have to keep track of all client connected.
Thanx a lot -
How do I get the hostname(or address) of the server?
How do I get the hostname(or address) of the server inside code
running on the server? I can use
Admin.getServer().getListenPort() to get the port number; but
calling Admin.getServer().getListenAddress() returns null.
Thanks
RajeshRajesh,
Try this:
import java.net.InetAddress;
Address.getHostName(); // This returns a string with hostname
"Rajesh Kommu" <[email protected]> wrote:
>
How do I get the hostname(or address) of the server inside code
running on the server? I can use
Admin.getServer().getListenPort() to get the port number; but
calling Admin.getServer().getListenAddress() returns null.
Thanks
Rajesh -
Get client ip in web reports 9i
Hi
we are using oracle 9i reports.
we want to get client's ip address when running web reports.
We are having forms which gets the ip address using
webutil but the same functionality is not available
in web reports.
How can this we get the client's ip address
when using web reports?Hi,
From WebUtil documentation:
WebUtil is primarily focused at solving the more common challenges faced by Forms developers whowish to build applications which integrate tightly with the "Client Browser" machine - the machine that the end user is actually sitting at.
Traditionally Forms has provided the means of integration with the machine that the Forms executable is running on, but in the Web-deployed scenario this can be remote from end users and may even be a different operating system from the systems that are being used to host the applicationâs user interface. WebUtil gives Forms developers the means to interact with the client browser machines with PL/SQL, without having to learn any new technology.
As far as I know, Oracle Reports has never provided this functionality. In fact, there hasn't been much stress on interacting with the client machine. And thus there is no direct functionality in 9i as well, to get client machine information.
If you are running your reports from Forms, you can get the client's IP address in the Form and populate it in a temporary table in the DB, from where Reports can then pick it up.
Navneet. -
User Exit in 10g - To get client info
Hi all
We have a user exit call in forms 4.5 which returns client info (OS version).
As we are going for 10g, the user exits will reside in AS.
Is there any way by which i can use the same user exit to get client info now ?
Thnx and Regards
Sriramin the old days of forms 6i we created tons of java-applets for host-commands and so on.
with the first version of webutil all the applets we created ourself were gone, because all functions were in the webutil-toolset.
You can use it beginning with forms 9i. It's very good and easy to use. Look in OTN where the developer-downloads are
Gerd
Maybe you are looking for
-
Can Anybody help this "display :0" problem I have? [SOLVED]
Hello, I am very new to Arch (and only on Linux for a year). I have 2 problems: Problem #1). When messing around after my install, I'm not sure what I did... but now I have an error every time I boot up and log in. The error is this: There already ap
-
Importing material from Bridge to AE (beginner)
In a recent AE tutorial I was enjoying, I was prompted to go to animation and browse presets to try them out, which launches Bridge. When I double clicked the preset I wished to use, AE displayed a message: After Effects error: Can't import file,
-
Unable to open RAW files with Photoshop CS6 - Camera Raw
Hi all, I'm trying to open .CR2 files from a Canon 450D on Photoshop CS6 as well as with Lightroom 4 but it doesn't work. I've updated the Adobe Camera Raw to its latest edition (8.8), but anyway, when I try to open them it appears the message below:
-
HT203254 When I Turn My Macbook Pro On The Screen Dosen't Work
My Macbook Pro Has A Nvidia Geforce GPU And The Screen Won't Work When I Turn It On
-
Website displays fine in Preview but not when 'Published' to BC
Hi I've posted this question twice in the Adobe Muse discussion forums and had zero response so hopefully people with more experience form the BC perspective might be able to shed some light on this. Basically I have a subscription to Muse and with t