Solved

Flex and Struts ip tracking problem

Posted on 2010-11-18
2
491 Views
Last Modified: 2012-05-10
Hi,
      My flex application is running on  http://www.mydomain.com. When we hit this URL the proxy will internally redirect to my flex application and will open myPage.html. I am using http service calls in my flex app. I will be calling java application with URL's http://subdomain.mydomain.com/xxx.action where the proxy internally redirects the http://subdomain.mydomain.com to our java application which is developed in struts 2.0.

Now my problem is when i try to track the ip address of the user with code servletRequest.getRemoteAddr() the ip addres i am getting is 127.0.0.1 instead of user ip addres. But i need the user ip address. Can any one help me out how to solve this
0
Comment
Question by:srujanmiryala
2 Comments
 
LVL 19

Accepted Solution

by:
Redimido earned 500 total points
Comment Utility
a proxy responds itself to the user request, while in its place, starts a new request to the proxied applications.

What I mean? If your proxy is working correctly, you always will se the requests coming from it.
You can still get the original client ip address in a header if you modify your proxy to send it, and the receiving application to read the original ip address from the header if present:

http://en.wikipedia.org/wiki/X-Forwarded-For
0
 

Author Closing Comment

by:srujanmiryala
Comment Utility
Hello Redimido,

Thank you for the help provided. It is working fine now.

Thank you very much
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now