GetLocalHost "IP Address" Only

Hi,
I am currently working a web application. I have this functionality which generates an email message with a URL LINK. I would like to know if how can i get a local IP address. (i produced the message from a localhost)
I want to display http://*192.16.0.1*:8084/myweb
How ever, it displays http://*localhost*:8084/myweb
so when a client clicks the URL it will be found.
I have already tried using request.getServerName but it produces "localhost",
i already found out about InetAddress.geLocalhost but it produces: [email protected] < --- only need 192.168.0.1.
Any help will be appreciated.
Thanks

quincex wrote:
Thanks for the reply,
No, there's no need to change the IP address (its actually an ip address of the server). This is my code:
if(request.getServerName().equals("localhost")){
hostIP= InetAddress.getLocalHost().toString(); < ---- I have to fix this line
}else{
hostIP = request.getServerName();
}What happens if you do this:
String ip = InetAddress.getLocalHost().getHostAddress();

Similar Messages

  • HT201342 How do I create a new iCloud account to be used as an email address only

    How do I create a new iCloud account to be used as an email address only?

    Howdy shark byte,
    This first article details how to set up an additional iCloud account as just an e-mail account on your iOS device.
    iOS: Setting up an email account
    http://support.apple.com/kb/HT4810
    Cheers,
    Allen

  • Creating a target group based on the BP email address only in CRM

    Hi there,
    I am currently trying to create a target group based on the business partner email address only.
    I have a list of over 1000 email addresses - these email addresses equate to a BP in our CRM system, however I do not have a list of the equivalent business partner numbers, all I have to work on are the email addresses.  With these 1000 BP email addresses I need to update the marketing attributes of each of these 1000 BP records in CRM.
    What I need is a method to find the 1000 BP numbers based on the email addresses and then use the marketing expert tool (tx. CRMD_MKT_TOOLS) to change the marketing attributes on all of the 1000 BPs.
    The issue I am having is how can I find the list of BP numbers just based on the BP email address, I tried creating an infoset based on table BUT000, BUT020 and ADR6 but I after creating attribute list & data source for this I am stuck on what to do next. In the attribute list the selection criteria does not allow me to import a file for the selection range.  I can only enter a value but I have 1000 email addresses and cannot possibly email them manually in the filter for the attribute list.   I also looked at imported a file into the target group but I do not have any BP numbers so this will not work.
    Does anyone know a method where I can create a target group based on the email addresses only without having to do any code?
    Any help would be most appreciated.
    Kind regard
    JoJo

    Hi JoJo ,
    The below report will return you BP GUID from emails that is stored in a single column .xls file and assign the BP to a target group.
    REPORT  zexcel.
    * G L O B A L D A T A D E C L A R A T I O N
    TYPE-POOLS : ole2.
    TYPES : BEGIN OF typ_xl_line,
    email TYPE ad_smtpadr,
    END OF typ_xl_line.
    TYPES : typ_xl_tab TYPE TABLE OF typ_xl_line.
    DATA : t_data TYPE typ_xl_tab,
           lt_bu_guid TYPE TABLE OF bu_partner_guid,
           ls_bu_guid TYPE  bu_partner_guid,
           lt_guids TYPE TABLE OF bapi1185_bp,
           ls_guids TYPE  bapi1185_bp,
           lt_return TYPE bapiret2_t.
    * S E L E C T I O N S C R E E N L A Y O U T
    PARAMETERS : p_xfile TYPE localfile,
                  p_tgguid TYPE bapi1185_key .
    * E V E N T - A T S E L E C T I O N S C R E E N
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_xfile.
       CALL FUNCTION 'WS_FILENAME_GET'
         IMPORTING
           filename         = p_xfile
         EXCEPTIONS
           inv_winsys       = 1
           no_batch         = 2
           selection_cancel = 3
           selection_error  = 4
           OTHERS           = 5.
       IF sy-subrc <> 0.
         CLEAR p_xfile.
       ENDIF.
    * E V E N T - S T A R T O F S E L E C T I O N
    START-OF-SELECTION.
    * Get data from Excel File
       PERFORM sub_import_from_excel USING p_xfile
       CHANGING t_data.
       SELECT but000~partner_guid FROM but000 INNER JOIN but020 ON
    but000~partner =
       but020~partner
         INNER JOIN adr6 ON but020~addrnumber = adr6~addrnumber INTO TABLE
    lt_bu_guid FOR ALL ENTRIES IN t_data WHERE adr6~smtp_addr =
    t_data-email.
       CLEAR: lt_guids,ls_guids.
       LOOP AT lt_bu_guid INTO ls_bu_guid.
         ls_guids-bupartnerguid = ls_bu_guid.
         APPEND ls_guids TO lt_guids.
       ENDLOOP.
       CALL FUNCTION 'BAPI_TARGETGROUP_ADD_BP'
         EXPORTING
           targetgroupguid = p_tgguid
         TABLES
           return          = lt_return
           businesspartner = lt_guids.
    *&      Form  SUB_IMPORT_FROM_EXCEL
    *       text
    *      -->U_FILE     text
    *      -->C_DATA     text
    FORM sub_import_from_excel USING u_file TYPE localfile
    CHANGING c_data TYPE typ_xl_tab.
       CONSTANTS : const_max_row TYPE sy-index VALUE '65536'.
       DATA : l_dummy TYPE typ_xl_line,
              cnt_cols TYPE i.
       DATA : h_excel TYPE ole2_object,
              h_wrkbk TYPE ole2_object,
              h_cell TYPE ole2_object.
       DATA : l_row TYPE sy-index,
              l_col TYPE sy-index,
              l_value TYPE string.
       FIELD-SYMBOLS : <fs_dummy> TYPE ANY.
    * Count the number of columns in the internal table.
       DO.
         ASSIGN COMPONENT sy-index OF STRUCTURE l_dummy TO <fs_dummy>.
         IF sy-subrc EQ 0.
           cnt_cols = sy-index.
         ELSE.
           EXIT.
         ENDIF.
       ENDDO.
    * Create Excel Application.
       CREATE OBJECT h_excel 'Excel.Application'.
       CHECK sy-subrc EQ 0.
    * Get the Workbook object.
       CALL METHOD OF h_excel 'Workbooks' = h_wrkbk.
       CHECK sy-subrc EQ 0.
    * Open the Workbook specified in the filepath.
       CALL METHOD OF h_wrkbk 'Open' EXPORTING #1 = u_file.
       CHECK sy-subrc EQ 0.
    * For all the rows - Max upto 65536.
       DO const_max_row TIMES.
         CLEAR l_dummy.
         l_row = l_row + 1.
    * For all columns in the Internal table.
         CLEAR l_col.
         DO cnt_cols TIMES.
           l_col = l_col + 1.
    * Get the corresponding Cell Object.
           CALL METHOD OF h_excel 'Cells' = h_cell
             EXPORTING #1 = l_row
             #2 = l_col.
           CHECK sy-subrc EQ 0.
    * Get the value of the Cell.
           CLEAR l_value.
           GET PROPERTY OF h_cell 'Value' = l_value.
           CHECK sy-subrc EQ 0.
    * Value Assigned ? pass to internal table.
           CHECK NOT l_value IS INITIAL.
           ASSIGN COMPONENT l_col OF STRUCTURE l_dummy TO <fs_dummy>.
           <fs_dummy> = l_value.
         ENDDO.
    * Check if we have the Work Area populated.
         IF NOT l_dummy IS INITIAL.
           APPEND l_dummy TO c_data.
         ELSE.
           EXIT.
         ENDIF.
       ENDDO.
    * Now Free all handles.
       FREE OBJECT h_cell.
       FREE OBJECT h_wrkbk.
       FREE OBJECT h_excel.
    ENDFORM. " SUB_IMPORT_FROM_EXCEL
    Just copy paste the code and run the report select any local xls file with emails and pass the target group guid.
    snap shot of excel file:
    Let me know if it was useful.

  • Access - How to create Mail Address only list?

    Printing envelopes from mail lists - via Microsoft Excel? Access - How to create Mail Address Only list?
    Bearing my "new boy" status, step by step instruction would be appreciated.

    Hi
    This is a question only about the Microsoft products and has nothing to do with Toshiba notebooks but I have investigated a little bit in the net and found this useful sites:
    http://support.microsoft.com/kb/q141991/
    https://www.nahu.org/member/using%20excel%20to%20create%20lists%20and%20labels .pdf

  • Using manual IP address only for specific networks

    For my home network I use DHCP with manual address because I have to forward some ports specifically to my computer. However this causes problems when connecting to other networks. For some reason this setting stays active even when using other networks. Therefore, I can't connect to say my school network because the setting has to be set to plain DHCP. Is there a way to use manual IP address only for specific networks?

    System Preferences > Network > Locations and add a location for your home with its manual settings. Add a location for other DHCP locations. Then when you want to connect at another DHCP location select that location from your locations dropdown.

  • Printing sender's address only on small envelope

    I'm trying to help my Mom send many Thank You cards out. I've succeeded in printing the message on the cards however I'm having problems printing address on the small envelope. The people whom she's trying to send the cards out are not people who we need to keep in our address book. So we are trying to speed up the process by printing her/senders address only on the envelope and hand writing the send-to addresses instead of entering some 200 entires into my address book.
    I didn't know about the Address app's print function so first I tried it with TextEdit. I've done some acrobatics moves to make it print my/sender's address somewhat close but I couldn't make it to print it any closer than 1" margin from the top left corner edges. Now I'm trying from the Mac's Address app but I ran into problem of not being able to print only the sender address; it seems I can only choose both addresses or none at all. I'm thinking probably there is a way but since I'm trying to do this for the first time I can't figure out. Anyone know how?

    Hi George,
    From your description, here is my understanding about your issue:
    You create a rule on user1's mailbox: If messages come from external, forward them to user2's mailbox. In user1's mailbox, message from external doesn't show the sender's email address. If I have misunderstood your concern, please let me know.
    Based on my knowledge, if a message from external, it should show the sender's email address. Also, I have a test in my environment using Exchange 2010 with Outlook 2013, it works. In your case, I recommend you check if OWA has the same issue. Also, please
    send a message from external without forward and check if this external sender's email address will be displayed.
    What's more, I would like to clarify the following thing:
    User1([email protected]) create a rule that forwards messages from userA(external user,
    [email protected]) to user2([email protected]). If userA sends a message to user1, in user1's Inbox, this message from "userA <[email protected]>"; in user2'a Inbox,
    this message from "user1" not "userA <[email protected]>".
    Besides, forward and redirect are two different things.
    Hope my clarification is helpful.
    Best regards,
    If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Amy Wang
    TechNet Community Support

  • Hi Guys, i mistakenly synced my iphone and all my email contacts appears in my contacts list. its mixed up. can someone please assist me on how to delete the email address ONLY?

    hi Guys, i mistakenly synced my iphone and all my email contacts appears in my contacts list. its mixed up. can someone please assist me on how to delete the email address ONLY?

    Don't understand your problem... Contacts sync with a compatible address book or cloud service. Contact records can contain names, addresses, phone numbers, e-mail addresses, notes, or any combination of these. If you have records you don't want in your address book that you don't want in your contacts, then segregate them into groups in your address book and only sync the group(s) you want. If you don't want them there at all, then delete them.

  • I wantto delete an App from iTiunes.  How do I do that?  (The page on deleting a resouce addresses only music.)

    I wantto delete an App from iTiunes.  How do I do that?  (The page on deleting a resouce addresses only music.)

    It works fine for me.  Always has.
    Did you go to "Apps" under "Library" on the left side of the itunes screen and delete from there?

  • Distributing IP address only not working

    Hi everybody!
    I have a "big" problem with my brand new AirPort Extreme (802.11n).
    I bought it as replacement to my old AirPort Express (802.11g) because I needed an Ethernet LAN port but now the new one can't do what the old good airport express was doing perfectly.
    This is my network configuration: there's the provider's router (Zyxel Prestige-645R) with just one ethernet port which is connected to the AirPort Extreme's WAN port. I've deactivated the router's DHCP service but NAT service is still active.
    The AirPort Extreme is configured to distribute a range of IP addresses only, without acting as NAT.
    This means that it only uses DHCP to distribute the IP addresses, while port forwarding is done by the router's NAT.
    I did this because I needed to see my router from any wireless client and because double-NAT caused me few problems in the past (I can't manage to switch off the NAT on the router).
    So the router is 10.0.1.1, the AirPort Extreme 10.0.1.2 and the company's server 10.0.1.250.
    (The server handles DNS service)
    Now, the AirPort Extreme is configured to distribute IP address from 10.0.1.3 to 10.0.1.21.
    This is AirPort Extreme's internet configuration:
    IPv4: Manual
    IP Address: 10.0.1.2
    Subnet Mask: 255.255.255.0
    Router: 10.0.1.1
    DNS Servers: 10.0.1.250
    The problem that came out only with the AirPort Extreme is that it fails to give internet connection to DHCP clients! If I assign a static IP it works, if use DHCP it doesn't.
    The only abnormal thing I found out is that DHCP clients get as Router the IP 10.0.1.2 (which is the AirPort Extreme) instead of 10.0.1.1 (which is the provider's router). I THINK the problem is there...
    The strange thing is that it's configured exactly as the AirPort Express and that worked!
    Any advice?
    It's URGENT.
    Thanks

    That can be an option.
    I thought it would have been better this way... I'll try and let you know.
    The only bad thing is that with the AEBS I could assign static IPs via DHCP using the DHCP client ID, I was considering that for not having to change all the configuration on each computer every time it changes.
    But if this is the only way, well I'll use it.

  • HT204053 I have two apple ID's and it's causing problems in my contacts. It repeats the same address and sometimes displays email address only but not the full contact details? How do I get my contact list the same in all my devices (iMac, iPhone & iPad (

    I have two Apple ID's and it's casing problems on my contact list as it repeats the address in somecases and in others it only displays email address for a contact. I want to have the same contact list and details on all my devices (iMac, iPhone 4S & iPad Mini)? Is it possible?

    By using 1 of the 2 ID's instead of both, choose one, move everything in the other one to the one you chose and stop using it.

  • Is it possible to send a PDF to a specific e-mail address only?

    Is it possible to send a PDF to a specific e-mail address so that it cannot be re-sent by the recipient to another address?  I.e. goes to one person & no further.
    http://mcatprep.yolasite.com/
    <a href=http://mcatprep.yolasite.com/>M Prep</a>

    http://help.adobe.com/en_US/Acrobat/9.0/Professional/WS58a04a822e3e50102bd615109794195ff-7 d9c.w.html
    check out the portion that says you can apply security so only a specified person can open the file

  • Is it possible the RV320 block some external ip address only to some IP on my LAN ?

    Hello,
    i have been blocked in firewall rules some external IP address but it will applied for all computers on LAN.
    I would to know if is possible do it for only group of ip or vlan?
    Thank you,
    Raphael Guarita

    Raphael.
    When you select the Source and Destination address you should be able to select Range. There is no option to select a VLAN.
    http://www.cisco.com/c/dam/en/us/td/docs/routers/csbr/rv320/administration/guide/en/rv32x_ag_en.pdf
    - Marty

  • TiBook with self-assigned IP Address Only

    I have a titanium powerbook that has stopped connecting to the internet via the ethernet port. (It does find the internet via its Airport Card, however.) The network utility states that my powerbook as no ISP and a self-assigned one is used instead. I've tried powering down the modem for five minutes. (There is no router.) I've also confirmed that the ethernet source is not the problem, because my G4 Tower connects to the internet via the same cable.
    Any suggestions are welcome.
    Thanks,
    Trevor Monroe

    Hi Tim,
    Generally speaking, if a computer is set up for DHCP but it can't find a DHCP server, it will assign itself an IP address for that interface.
    It sounds to me like the iBook is having trouble talking to the AX (DHCP server). This could be caused by a variety of things, from failing hardware to software bugs to configuration issues.
    Has this only happened the one time? If this has only happened once, I'd call it a fluke. If it is or gets to be a frequent thing, we'll need to dig a little bit deeper.

  • How to float a landing page to capture email address, only shown once per visitor to the site, and not on return visits?

    I would like to float a landing page to capture email addresses, that is only shown once per visitor to the site, and not on return visits OR after they submit their email not to be asked again.
    thanks guys!

    Hi Scott,
    Thanks a lot for the advice.
    Actually I added user names to the apex_access_control table and assigned each user the desired privilege but did not notice that I should do the following setting.
    *Access Control Administration > [RUN] > Set Application Mode: Restricted access.*
    Thanks,
    Guy

  • Query Builder not locating emails based on email address, only the display name will work.

    I am trying to set up some search folders for Outlook 2010 for emails either to or from a specific domain name.  I am using the Query Builder to set up the logic for the search criteria.  
    Here's an example of what I am trying to do.
    I have three people from a specific company that I want all emails I either send them or they send me to go to.  Their email address are as follows:
    Jane Doe <[email protected]>
    John Doe <[email protected]>
    Mary Smith <[email protected]>
    Here is the issue I am having.  When I set up the criteria for the search folder, entering From --> Contains --> [email protected] (or any of the other addresses mentioned above) will return no results.  Entering From ---> Contains
    --> companyxyz.com will yield no results.  Only entering From ---> Contains --> Jane Doe will yield any results. 
    If I use the From field in the standard Messages Tab of the Search Folder Criteria window then just entering companyxyz.com will give me all the messages.  The problem that I have is that I cannot set up any OR conditionals with this standard field
    which is why I am using the Query Builder.
    My question is why doesn't the actual email address work for a search criteria in Query Builder and how can I set up a criteria for a domain name (@companyxyz.com) so that I can see all communication with a particular company?

    Hi,
    This is the expected behavior of Outlook.
    The Search Folder Criteria dialog has two From fields. One From field is under Messages tab and another From field is under the Advanced (or Query Builder) tab. The From field under Message tab uses email address while
    the From field under Advanced or Query Builder tabs uses the display name. So, when we want to use Query Builder to create a Search folder that filters by email address, the Query Builder ignores the email address and uses the display name instead.
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

Maybe you are looking for

  • Spry menu bar in firefox not telescoping main li horizontally

    I am having trouble with my spry menu bar in firefox and chrome not telescoping horizontally. In IE8 they tile horizontally but in firefox(3.6.10) and chrome(6.0.472.63) they stay tiled vertically. Example: IE8 [menu1][menu2][menu3][menu4][menu5] FF

  • How to Set up the User POV in Web Analysis report

    Hi , I am new to create the Hyperion Web Analysis report. I am trying to set up the user POV. I have followed the document and did the below steps. 1. I went to User preference -> OLAP Server -->checked the BOX "Save Filters only for POV". 2. selecte

  • Deleting past backups from time machine disk

    Hi all I was wondering how do you delete old time machine backups? Josh

  • Service Ticket "Priority" Field...

    I have a question about changing the Priorities in the Service Ticket Header Overview. The only place I have found so far that changes these is under: SPRO > CRM > Transactions > Settings For Activities > Maintain Categories, Goals, and Priorities >

  • Af:table auto width

    Hi Folks, i have an af:table with some column. Selection of some inputChoice hides/unhides on of the columns. The moment column is hidden i can see blank space for that column. How can we adjust the width of table based on nos of columns to be displa