Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

All solutions for Getting a client Remote ip address.

781994Jul 9 2010 — edited Jul 22 2010
Hello experts! I want to create a unified theme for the problem of obtaining ip address of the client computer. And for Remote ip address. Since a lot of questions and answers is less.

My problem:
I nees get the Internet Protocol (IP) address of the client or last proxy that sent the request.

First, the idea was to use Webutil. Function webutil_clientinfo.get_ip_address. But it is processed on the client and returns the address of the network card of the client. Right? Under this 1202502 It is not the remote address.

Next, the proposal to use 'sys_context('USERENV','IP_ADDRESS')'. It also does not give satisfactory results. Returns the address of the computer where you installed the database.

Next, use javaBean ClientInfo.http://forms.pjc.bean.over-blog.com/article-15985856.html - this. Again, not that. It works differently. Sometimes it returns 127.0.0.1. Sometimes it returns the address in local net (As webutil). And by the way the code for the address there looks like: "InetAddress.getLocalHost().GetHostAddress();" - Or I do not understand or he should not return the Remote address of last proxy.

Next, "servlet" with function "reqest.getRemoteAddr()". I found many examples of code for use java-servlet. For example it
http://www.oracle.com/technology/sample_code/tech/java/codesnippet/servlets/servletclientinfo/ReadServletClientInfo.html
Or this
http://www.apl.jhu.edu/~hall/java/Servlet-Tutorial/Servlet-Tutorial-CGI-Variables.html
I was able to program it in JPS+HTML and got what I wanted. But I have not figured out how to use the servlet in FORMS! :( And could not find a description of how to use it as well with Foms. Unfortunately I do not know very well java.

And the final proposed solution: is a "owa_util.get_cgi_env ('REMOTE_ADDR');"
It seems to be returning something that is necessary. But there was a problem: I wrote this in Forms. The form was compiled. But shows error "ORA-06502" when run form on brouser. I created a procedure on the server, which added a line with owa_util and call her from Forms (when run form on brouser) again and see the error. At this time "ORA-04067". This error says that there is no owa_util.


I'm confused :)
Help me and others to understand how to get the remote ip address please. :)


1) If I use javaBean, then whether I understood that "InetAddress.getLocalHost().GetHostAddress();" not return the Remote address of last proxy? Or maybe there are other features that I do not know?

Or

2) Is it possible to use a servlet with Forms? And if so, how?

Or

3) How do I add owa_util? I understand that it is not. Or am I not right?

Edited by: Ihavoker on 12.07.2010 8:33

Edited by: Ihavoker on 14.07.2010 15:33

Edited by: Ihavoker on 14.07.2010 15:37
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 19 2010
Added on Jul 9 2010
22 comments
5,227 views