Why request.getRemoteAddr() is displaying 127.0.0.1?

hi all,
when i try
<% out.print("IPADDRESS"+request.getRemoteAddr());%>
its printing 127.0.01.
i am trying to get the client ip address.i search in the forum and found that request.getRemoteAddr() to get client ip address but for me its showing 127.0.0.1?where i am wrong?
Any help will be greatly appreciated?

The above suggested solution works perfectly fine, if tested in an intra-net environment.
Where as on internet, this solution doesn't works.
I have tried uploading and deploying my war file on an eatj server.
But it is still giving me 127.0.0.1
Anybody please explain, why is this happening and how it can be resolved.
I have got some web-sites which say, that it can be done using javascript, but i want to do it using JSP/Servlets.
Please help...
My e-mail : [email protected]

Similar Messages

  • Request.getRemoteAddr() returning 127.0.0.1

    When I call getRemoteAddr() on my servlet, it returns the IP of the hosting server - not the client IP as it should. Is this a bug in Tomcat or is there something I am supposed to set to make this resolve properly?

    Is this a bug in TomcatNo. javax.servlet.HttpServletRequest.getRemoteAddr returns the Internet Protocol (IP) address of the client that sent the request. For HTTP servlets, same as the value of the CGI variable REMOTE_ADDR.
    127.0.0.1 is your local address. That's means that you accessed your web site locally.
    example:
    // Get client's IP address
            String addr = request.getRemoteAddr(); // 123.123.123.123
            // Get client's hostname
            String host = request.getRemoteHost(); // hostname.com

  • Why does my iMac display go off when I am starting up or waking up my machine from sleep..

    Why does my iMac display go off when I am starting up or waking up my machine from sleep..?
    When my iMac goes to sleep I then later try to click the magic track pad or keyboard and it will usually then show the initial password entry login screen and then go off. The machine is still on but the display is black and will sometimes flash up the screen again if I press the magic track pad or keyboard but will then black out again..

    Well, there are many different reasons why it does this. It might shut off due to power voltage problems, system overheats, or there is a System Problem. The reason it might be hard to boot up is because your power button might not work properly or your system hard drive is damaged.
    <Email Edited by Host>

  • To get the IP Address: request.getRemoteAddr()

    Dear All,
    I need to verify the IP address of any request after an user logs in. Can I use request.getRemoteAddr()? If the user is accessing my web site using dynamic IP address, DHCP etc, will I get a different IP address after a while?
    Thanks.
    WITH Regards
    FP

    Or, I should use the following method to get the ip address?
    InetAddress localHost = InetAddress.getLocalHost();
    hostAddress = localHost.getHostAddress();
    System.out.println(hostAddress);

  • Why targetcosts are not displaying in cost analysis

    hi
        i have created productcost collector thru kkf6n for a material.
    for that material i have backflashed and confirmed thru MFBF.then
    i display the cost analysis of productcostcollector where system is
    showing only Actual costs not target costs.
       can any body tell me why it is not displaying the targetcosts
    Thanks,
    Neelima

    Hi prasad kumar,
    1. Make sure the target cost version 0 (TCode: OKV6) is maintained correctly.
    2. Update run the variance calculation (Tcode: KKS6/KKS5) for the PCC.
    Regards

  • Why some PDF docs displayed are garbled and others are not?

    I've had this love hate relationship with adobe for the past few days.  I'm so frustrated since I can't seem to figure why other pdf docs display information correctly while others are garbled. It looks as if the letters/text overlap.  I 'm loosing sleep over this.  I'm at my wits end. Can someone please help? I appreciate any assistance you can provide.
    Thanks,
    C

    Hi Allegria11,
    Don't lose sleep over Adobe! Let's see what we can figure out. But I have lots of questions to get us started:
    Are you creating the PDFs yourself, or viewing PDFs from different sources?
    What are you using to view the PDFs (Reader, Acrobat, and what versions)?
    Do these PDFs all use the same fonts, or different ones?
    Do you know whether the fonts are embedded/subsetted in the PDFs? (You can check by choosing File > Properties and clicking the Fonts tab.
    Let's start there, and we will dig deeper if none of these shed any light on the problem.
    Best,
    Sara

  • Why does Internet Explorer display an outline around the hotspot I just clicked on?

    hi all
    Why does Internet Explorer display an outline around the hotspot I just clicked on? what do i have to do to sort this?
    can anyone help please
    gman

    hi hans-g
    thank you for your help and links, was banging my head off the wall the last day . will use forum from now on, really appreciate your help thanks again

  • Why does my computer display a spring coloured wheel that stops me from doing anything

    Why does my computer display a spinning coloured wheel that stops me from doing anything, the only way to get rid is to switch off and reload...

    These instructions must be carried out as an administrator. If you have only one user account, you are the administrator.
    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad and start typing the name.
    Step 1
    For this step, the title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen.
    In the top right corner of the Console window, there's a search box labeled Filter. Initially the words "String Matching" are shown in that box. Enter "BOOT_TIME" (without the quotes.)
    Each message in the log begins with the date and time when it was entered. Select the BOOT_TIME log message that corresponds to the last boot time when you had the problem. Now clear the search box to reveal all messages. Select the ones logged before the boot, during the time something abnormal was happening. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    For example, if the system was unresponsive or was failing to shut down for three minutes before you forced a restart, post the messages timestamped within three minutes before the boot time, not after. Please include the BOOT_TIME message at the end of the log extract—not at the beginning.
    If there are long runs of repeated messages, please post only one example of each. Don’t post many repetitions of the same message.
    When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Some private information, such as your name, may appear in the log. Anonymize before posting.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Step 2
    In the Console window, select
              DIAGNOSTIC AND USAGE INFORMATION ▹ System Diagnostic Reports
    (not Diagnostic and Usage Messages) from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar.
    There is a disclosure triangle to the left of the list item. If the triangle is pointing to the right, click it so that it points down. You'll see a list of reports. A crash report has a name that begins with the name of the crashed process and ends in ".crash". A panic report has a name that begins with "Kernel" and ends in ".panic". A shutdown stall report has a name that ends in ".shutdownstall". Select the most recent of each, if any. The contents of the report will appear on the right. Use copy and paste to post the entire contents—the text, not a screenshot. It's possible that none of these reports exists.
    I know the report is long, maybe several hundred lines. Please post all of it anyway.
    If you don't see any reports listed, but you know there was a crash or panic, you may have chosen Diagnostic and Usage Messages from the log list. Choose DIAGNOSTIC AND USAGE INFORMATION instead.
    In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.)
    Please don’t post other kinds of diagnostic report—they're very long and rarely helpful.

  • Why is one iphone displaying the text messages of the other 2 iphones in my house?

    Why is one iphone displaying the text messages of the other 2 iphones in my house?

    That would be imessage and not text message.
    As stated by sberman, it's because the users are sharing apple id.
    On each devices - settings - message - send&receive- remove or uncheck the apple ids.

  • Why java only can display GIF file not jpeg and BMP ??

    Did anyone know why java only can display GIF file not in jpeg and BMP ?? This is because the quality of GIS is not as good as Jpeg and BMP
    any code to load the display process ??
    thx guys !!!

    you can do jpegs but im not sure about bmps.
    The only thing ive noticed is that java cant support transparent jpegs, only transparent gifs
    Jim

  • Why don't colours display correctly in the viewer

    why don't colours display correctly in the viewer

    What are you seeing? Post a screenshot?
    What computer is this?

  • Why my ipodmy ipod displays do not disconnect and wont sync but can be restored?

    why my ipodmy ipod displays do not disconnect and wont sync but can be restored?

    If it is a problem than I have it too. Mine does the
    same as long as I don't stop the device via the
    little green arrow icon (USB manager) down by the
    clock.
    I never really need to use the Ipod when it is hooked
    into the PC because everything is done through
    iTunes. I just thought it said "do not disconnect"
    because it was associated with both iTunes and the PC
    as a hard disk.
    If I stop the device or "eject" the iPod, it goes
    from do not disconnect to the normal menu tree.
    So when you take the USB cable out of the iPod, it goes back to normal?
    If that's what you mean, mine does that too.
    It's just that I read that if you remove the USB cable from your iPod while it says 'do not disconnect', it can wipe all your music....

  • Why are the CAPTIONS displayed smack across everyone's face?

    Why are the CAPTIONS displayed smack across everyone's face on the screen???  I need the captions to HEAR better but I still want to SEE the show.  When the text is displayed across everyone's eyeballs it's very disruptive.  And I want ONE BUTTON on my remote to turn captions on/off; from a user perspective it is unnecessary to go through the menu settings everytime.  Take a stand and do something about improving CAPTIONS!!!

    mibrnsurg wrote:
    skeeterintexas wrote:
    JoannaG wrote:
    Why are the CAPTIONS displayed smack across everyone's face on the screen???  I need the captions to HEAR better but I still want to SEE the show.  When the text is displayed across everyone's eyeballs it's very disruptive.  And I want ONE BUTTON on my remote to turn captions on/off; from a user perspective it is unnecessary to go through the menu settings everytime.  Take a stand and do something about improving CAPTIONS!!!
    The CC text is on the bottom third of the screen.  I don't understand the problem.  *shrugs*
    Actually when I first replied, I checked the CC on the channel I was on and it was in the 'face' position the OP complained about.  Now checked here on recording of Sprint Cup qualifying and it's at the bottom.  Looks like some are not in the bottom 1/3 of the screen.
    Chris
    Please NO SD stretch-o-vision or 480 SD HD Channels
    Need Help? PM ATT Uverse Care (all service problems)
    ATT Customer Care(all other problems)
    Your Results May Vary, In My Humble Opinion
    I Call It Like I See It, Simply a U-verse user, nothing more
    You're right...some closer to the bottom, some closer to the top.  I wonder if it's a network decision or just random.

  • Why does my iMac display keep shutting off?  Computer still running in the background.  I've tried unplugging and restarting, to no avail.

    Why does my iMac display keep shutting off?  Computer still running in the background.  I've tried unplugging and restarting, to no avail.    The computer is well out of warranty - about 7-8 years old, running 10.6.8

    Checked.... the settings had not been inadvertently changed, but I did move the scroll and reset them back to the original.   Hasn't shut off again.... yet.   Will re-post with follow-up one way or the other.   Thanks.

  • Why is my computer displaying A's  with boxes around them instead of words?

    Why is my computer displaying A's with boxes around them instead of words? Is this the malware virus of today? I can get on the internet but just can't read anything. Please help!

    Back up all data.
    Launch the Font Book application and validate all fonts. You must select the fonts in order to validate them. See the built-in help and the support article linked below for instructions. If Font Book finds any issues, resolve them, then boot in safe mode* (by holding down the shift key at the startup chime) to rebuild the font caches. Boot again as usual and test.
    Mac 101: Font Book
    *Note: If FileVault is enabled under Mac OS X 10.7 or later, or if a firmware password is set, you can’t boot in safe mode. In that case, after running Font Book, launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ If you’re running Mac OS X 10.7 or later, open LaunchPad. Click Utilities, then Terminal in the page that opens.
    Drag or copy — do not type — the following line into the Terminal window, then press return:
    sudo atsutil databases -remove
    You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. After running the command, reboot as usual.

Maybe you are looking for