get the IP directly through EL

Hello

I use jdeveloper 11.1.1.7.0

to get the address IP of the server and the client I use below code in java, and these codes work well:

 FacesContext ctx = FacesContext.getCurrentInstance();
 HttpServletRequest request = (HttpServletRequest)ctx.getExternalContext().getRequest();

 request.getRemoteAddr();  //client IP address
 request.getLocalAddr();   //server IP address

I want to know if there is a way to get the IP directly through EL or not?

I mean there is no need to use these java codes (do not use #{beanName.methodnName})

Concerning

Habib

Please try:

#{facesContext.externalContext.request.remoteAddr}

Thank you

Tags: Java

Similar Questions

  • using PostDelayedCall how to get the value passed through void * callbackData?

    Can someone tell me how to get the data passed through void * callbackData?

    The following code, panel_ptr has the right address but still contains zero.

    void CVICALLBACK value_changed (void * callbackData)
    {
    int * panel_ptr;
     
    panel_ptr = callbackData;
    calculate_new_value (* panel_ptr);
    }

    int sign;

    Panel = 2;

    PostDelayedCall (value_changed & Panel, 0.2);

    The problem is using the callbackData parameter if it is a pointer, it must be a pointer to something which is still topical at the moment that the callback executes. That is to say, you cannot pass the pointer to a local variable in callbackData as when the callback executes the pointer is no longer valid. You can switch from its value, instead, in this way:

    ... SomeFunction)

    {

    int sign;

    ...

    Panel = 2;

    PostDelayedCall (value_changed, (void *) Panel, 0.2);

    ...

    }

    void CVICALLBACK value_changed (void * callbackData)
    {
    int panel_ptr;
     
    panel_ptr = (int) callbackData;

    calculate_new_value (panel_ptr);

    return;
    }

    There are many discussions on the forums on callbackData parameter that you might want to read.

  • Cisco ASA5520 facing ISP with private IP address. How to get the IPSec VPN through the internet?

    / * Style definitions * / table. MsoNormalTable {mso-style-name : « Table Normal » ; mso-tstyle-rowband-taille : 0 ; mso-tstyle-colband-taille : 0 ; mso-style-noshow:yes ; mso-style-priorité : 99 ; mso-style-qformat:yes ; mso-style-parent : » « ;" mso-rembourrage-alt : 0 à 5.4pt 0 à 5.4pt ; mso-para-marge-top : 0 ; mso-para-marge-droit : 0 ; mso-para-marge-bas : 10.0pt ; mso-para-marge-left : 0 ; ligne-hauteur : 115 % ; mso-pagination : widow-orphelin ; police-taille : 11.0pt ; famille de police : « Calibri », « sans-serif » ; mso-ascii-font-family : Calibri ; mso-ascii-theme-font : minor-latin ; mso-fareast-font-family : « Times New Roman » ; mso-fareast-theme-font : minor-fareast ; mso-hansi-font-family : Calibri ; mso-hansi-theme-font : minor-latin ;}

    Hello guys,.

    I have Cisco ASA5520 facing the ISP with private IP address. We don't have a router and how to get the IPSec VPN through the internet?

    The question statement not the interface pointing to ISP isn't IP address private and inside as well.

    Firewall configuration:

    Firewall outside interface Gi0 10.0.1.2 > ISP 10.0.1.1 with security-level 0

    Firewall inside the interface Ethernet0 192.168.1.1 > LAN switch 192.168.1.2 with security-level 100

    I have public IP block 199.9.9.1/28

    How can I use the public IP address to create the IPSec VPN tunnel between two sites across the internet?

    can I assign a public IP address on the Gig1 inside the interface with the security level of 100 and how to apply inside to carry on this interface?

    If I configure > firewall inside of the item in gi1 interface ip address 199.9.9.1/28 with security-level 100. How to make a safe lane VPN through this interface on the internet?

    I'm used to the public IP address allocation to the interface outside of the firewall and private inside the interface IP address.

    Please help with configuration examples and advise.

    Thank you

    Eric

    Unfortunately, you can only complete the VPN connection on the interface the VPN connection source, in your case the external interface.

    3 options:

    (1) connect a router in front of the ASA and assign your public ip address to the ASA outside interface.

    OR /.

    (2) If your ISP can perform static translation of 1 to 1, then you can always finish the VPN on the external interface and ask your provider what is the static ip address assigned to your ASA out of the IP (10.0.1.2) - this will launch the VPN of bidirectionally

    OR /.

    (3) If your ISP performs PAT (dynamic NAT), then you can only start the tunnel VPN on the side of the ASA and the other end of the tunnel must be configured to allow VPN LAN-to-LAN dynamics.

  • How to get the .rbf and .through files?

    Hello I am currently working on the project, which provides for automatic deployment and launch programs everchanging.

    Ev3 are scattered in different schools. I wrote a simple script that can download a file and then send it to ev3 via wifi.

    But I'm currently stuck on how to get .rbf and Labview .through files.
    I know that I can deploy .vi using the target to ev3 and then upload these files to the PC, but I can't add script.
    Is it possible to compile .vi to the file?

    Sorry, try this

  • help get the records corrected through an existing image?

    I'm doing a lip with a file sync HAVE 'flying pig' I downloaded Adobe stock. I thought that in the way groups name change I could create a puppet. Is there a way to help in getting the correct records with an existing image?

    Jeff

    One of the fastest ways to understand our structure of ideal layering is to open one of our model puppets.  You can do this in the menu of the puppet by selecting, new puppet in Illustrator (or new puppet in Photoshop).  Once you select the menu item, Illustrator will launch and open the model of our puppets.  In the layers panel, you can see that the hierarchy specifies a character that contains different layers with names of specific layers allowing character animation to understand the structure and animating the puppet.  The "+" at the beginning of the name indicates that the layer is distorted independent of the parent layer.  Layers without the + will be part of the "rubber sheet" with the other layers of the same group of warping.  Your puppet should have a hierarchy of layer similar to that of the model, which allows behaviors to live your character.  You can use this template as a guide, or simply replace the work directly in the template file.  Good luck!

  • How to get the microphone audio through speakers

    Original title: I want to talk in my microphone and hear what I speak STRAIGHT from the speakers. It happens in windows XP directly that you plug the microphone but not VISTA.__remember I don't want to record and listen... I want LIVE LIVE, pure!
    Remember - this is a public forum so never post private information such as numbers of mail or telephone!

    Ideas:

    • You have problems with programs
    • Error messages
    1. Recent changes to your computer
    • What you have already tried to solve the problem

    Hi Moosa Lakhani,

    Follow these steps to set up your microphone:

    a. click theStart button and clickControl Panel.
    b. clickhardware and audio.
    c. now, click on her.
    d. in the Audio window, click the recording tab.
    e. right click on the microphone device you just connected and select' set as default device'option.
    f. right click on the microphone, and then click Properties.
    g. now, click the listen tab.
    h. Select listen to this device .
    i. click apply and then click Ok.

    See the screenshot below:

    Refer to this link for help:
    http://Windows.Microsoft.com/en-us/Windows-Vista/connect-a-microphone-music-player-or-other-audio-device-to-your-computer

    Kind regards
    Afzal Taher-Microsoft Support.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • How to connect to the Internet directly through my Office Firefox icon?

    MSG appears telling me that it cannot connect to my ISP (PeoplePC) home page

    What is a remote access ISP service?

  • Unable to get the widget to open dreamweaver cs6 mac

    Mac S 10.6.8 (snow leopard)

    I am unable to load widgets since dreamweaver CS6. Able to sign into Adobe ID, but will not charge.

    Message: "could not feed widget. Make sure that you are connected to the internet. unknown error. »

    Firefox, safari, and google chrome; all erased and all configured to accept cookies.

    checked and repaired disk permissions.

    have you tried signing in before trying to connect through dreamweaver.

    I need to download something?

    No, browser widgets is obsolete and the site who populated app in the browser is no more.

    You can try to get the widgets directly from third-party developers, or to the search page modules Adobe here: https://creative.adobe.com/addons

  • Unpacking error when you try to use UTL_COMPRESS. LZ_UNCOMPRESS to get the text XML 'payload' of a BLOB field

    Hi, really appreciate any pointers anyone may have with what I'm trying to do here... the crux of the matter, I have is the following:

    * Try to get the contents of a BLOB column directly in PL/SQL, zipped/compressed

    Uncompressed data are XML... below is an example quite pinked...

    <? XML version = "1.0"? >

    <! DOCTYPE TaskConfiguration >

    < TaskConfiguration >

    < MapKeySet >

    < macro keyboard Type = 'C' >

    namespace < Key > < / key >

    < value > B_O_BrokerChks < / value >

    < / macro keyboard >

    < / MapKeySet >

    < / TaskConfiguration >

    * I learned the information in the table of these pages & used all_directories + a pirated version of proc WRITEBLOBTOFILE (also from here) to get this data in a zip file. That worked fine and I can open the file that results with 7 - zip or explore (how I got the sample above)

    * I tried a few tweaks to the functions provided here to try to get the data directly into the pl/sql (ideally I would like to be able to enter in a type of XMLTYPE data & query only). However, that's where I'm struggling

    * I get the same error as I do with this 1-liner

    SELECT UTL_COMPRESS. LZ_UNCOMPRESS (XML) FROM FooBooBazVendorTab where REFERENCE_ID = 19834

    ORA-29294: A data error occurred during compression or decompression.

    ORA-06512: at "SYS." UTL_SYS_COMPRESS", line 56

    ORA-06512: at "SYS." UTL_SYS_COMPRESS', line 226

    ORA-06512: at "SYS." UTL_COMPRESS", line 89

    29294 00000 - "a data error occurred during compression or decompression."

    * Cause: An error occurred during compression or decompression input source.

    * Action: Verify that the source data is a set of data compressed or invalid.

    Info * @desc to the col de BLOB XML is as follows

    * I also read a ' UTL_COMPRESS. LZ_UNCOMPRESS cannot process the file gzip with FCOMMENT' thread here and I tried the potential workaround here who is trying to manipulate the content of the blob to remove the FCOMMENT... but nothing helps. I must say that I am not sure that it's actually my problem.

    Details on the Zip file I can glean from 7 - Zip are as follows...

    * Any ideas please? (If Oracle decompress may have a problem handling the XML data itself... with my way of thinking on the FCOMMENT being a bit of a furphy?)

    * Don't know if the zip file hexview can help, but just in case where is >

    I would be very grateful for any help you might be able to give me this.

    Rgds Neil

    UTL_COMPRESS use of LZ compression, which is a version less compression compared to normal ZIP files (that use LZW, often with additional ' Deflate' or other methods).

    Anton Scheffer (member of the these for one) wrote a package to compress and decompress found related to this article on his blog:

    Analysis of a Microsoft Word docx and unpack zipfiles, PL/SQL - Blog of AMIS

  • Get the value of the field that is formatted

    I have a few fields in the format number with 1 or 2 decimal places. I use these values in a string that is concatenated in another field, and I want to use the number formatted in this calculation. Using valeur.champ or field.valueAsString just gets the value as written is "412" instead of "412.0'.»

    Y at - it an easy way to get the value directly as it is formatted, or do I need to replicate the setting in shape when I am concatenating the string?

    There is no way easy in general. The routine of formatting for numbers uses the util.printf method, so for example you gave, it is easy to reproduce.

  • Get the userid of the ObSSOCookie.

    Hi all
    We have protected our request with webgate.
    After the password and username production ObSSOCookie which is defined in the browser.
    Can any body provide me some api which will facilitate to me to get the user name in the ObSSOCookie.

    Thank you
    Arun.

    Yes, by using the SDK to access server, you can get the user DN for the user whose ObSSOCookie is generated. You can not get the user directly using an API ID, but the use of API functions, you can get the unique name, from there, you can get the user ID.

    Start by creating a portal to the OAM administration console. Then install and configure the Access Server SDK. Then, you will need to write the following code (given psudocode). This will accomplish what you're looking for. The code can be written in C, C++ or Java.

    Initialize the Asdk (ObConfig::initiate(asdk_path))
    Then create obUserSession object using the obssocookie as an argument to the ctor value
    obUserSessionObj.getUserIdentity - this will give you the UtilisateurDN.
    Close the connection Asdk.

    I hope this helps. Let us know.

  • How to get the jar file without knowing his name and any class on the inside?

    Hello, everyone!

    I would like to know if there is a way to get a reference programmatically in the original container without knowing his name and any class it contains. I mean by "initial pot" the pot that was called in the prompt, like this:
    java -jar jarfile.jar
    or in another way, in a graphics system. To be honest, what I really want is to get a reference to the manifest of the jar, but I know that if I can get a reference to the jar I can get a reference to its manifest file. Or if you know a way to get the manifest directly, it would also be useful. So, is there a way to do this?

    Thank you.

    Marcos

    Ah, so you want to find the calling class and get its source code.

    I managed to get the class calling on occasion, but this is probably a somewhat fragile solution. You must extend SecurityManager because getClassContext() is a protected method.

        private static class CallerFetch extends SecurityManager {
    
            public Class getCallerClass() {
                return getClassContext()[3];
            }
        }
        private static CallerFetch callerFetch =
                new CallerFetch();
    
        /**
         * Find the class of the code which called the
         * method that invokes this method.
         * @return The class of the caller's caller
         */
        public static Class getCallerClass() {
            return callerFetch.getCallerClass();
        }
    
  • When going through the process of downloading with social monkee and reach the point add it to firefox, I get the following message: "social Monkee cannot be installed because firefox is unable to modify the required." How can this be repaired?

    When going through the process of downloading with social monkee and reach the point add it to firefox, I get the following message: "social Monkee cannot be installed because firefox is unable to modify the required." How can this be repaired?

    Which is usually caused by a lack of unpacking the directive (< em: unzip > true < / em: unzip >) in the file install.rdf to this extension.

    See https://developer.mozilla.org/En/Updating_extensions_for_Firefox_4.0#XPI_unpacking

  • Get the code of BlackBerry PIN through lines of command, or c# program

    Hi all

    Could you please suggest me the way to get the PIN of BlackBerry code through lines of command, or c# program. Either it's direct BlackBerry or BlackBerry device Simulator and which is connected by USB.

    You can use the javaloader.exe command-line tool to do this.  It is included with the JDE BlackBerry and BlackBerry Java plug-in for Eclipse.  The following command will do.

    JavaLoader u deviceinfo

  • I want to set up an online quotation tool in my view based on a small number of variable input by the visitor. If someone has done this through Muse and able to assist / point me in the right direction please? Thank you!

    I want to set up an online quotation tool in my view based on a small number of variable input by the visitor. If someone has done this through Muse and able to assist / point me in the right direction please? Thank you!

    Hello

    These discussions could be useful

    I need to put a form to give a quote, does anyone have any ideas

    "Click to add to your" function

    Get the Quote button functionality

    Let me know if you have any question.

Maybe you are looking for