This content has been marked as final. Show 7 replies
If you don't need the whole webutil functionality it would be easier to write a simple java bean which returns the name of the client hostname.
Something similar to this: http://stackoverflow.com/questions/5596788/get-hostname-of-local-machine
Its an urgent requirementhttp://www.catb.org/esr/faqs/smart-questions.html#urgent
I have tried sys_context and java class option already ..but in vain :(..
Let me explain my problem in detail.
My database server(Oracle 10g) is in HOSTA
My appserver (Oracle 10g AS)resides in HOSTB
And user launches the application from HOSTC
My requirement is to get the host name of the user while he launches the application. ie HOSTC in this case.
If I am trying with java.net.InetAddress.getLocalHost().getHostName(); I am getting the value HOSTA(Host name of Data base server)
If I am trying with SYS_CONTEXT I am getting HOSTB(Host name of appserver)
And my requirement is to get HOSTC !!!
I have read that if Webutil_clientinfo.get_host_name is used I can get the host name of client machine. But since I am working with forms 6i , I can't use Webutil.
please help me if you know any way to achieve the same in forms 6i
I guess you are using this 10g version which is in reality a 9i version capable of running 6i forms in the web (maybe you should post a 4 digit version number instead a marketing label)
If I am trying with java.net.InetAddress.getLocalHost().getHostName(); I am getting the value HOSTA(Host name of Data base server)Could it be that you are trying to do this within a Java Stored Procedure? Because otherwise there is no way that you are getting the Hostname of the database server with this Method.
A stored java procedure is executed on the database server; getHostName() will return the name of the host where it is executed. What you need is to execute code on the client, not on the middletier, and not on the database. A java bean is such a thing: