Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Flex and Struts ip tracking problem

Posted on 2010-11-18
2
Medium Priority
?
516 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 2000 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

WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

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 second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
The viewer will learn how to implement Singleton Design Pattern in Java.
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…

730 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