Solved

Flex and Struts ip tracking problem

Posted on 2010-11-18
2
515 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Accepted Solution

by:
Gabriel Orozco earned 500 total points
ID: 34184029
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
ID: 34318303
Hello Redimido,

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

Thank you very much
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

630 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