Remote host address in Java Server Faces

how to get remote host address in JSF/Portlet application.
getFacesContext().getExternalContext().getRequest().getRemoteAddr() is not available, even header map (getRequestHeaderMap()) does not contain any data about client.

In a portletcontext the getRequest() have to be casted to PortletRequest. Then you can use getRemoteUser() on it.

Similar Messages

  • Java server faces mvc pattern

    Well i dont know any knowledge of java servr faces.Dows java Server faces encapsulate mvc pattern like struts other then html tag library.
    Thanks.

    JSF only addresses the "user interface" framework portion of a web application. You can perhaps think of it as standardizing the "V" in MVC (I don't know if this is quite right, is it so Craig?). We wish that there will be another JSR in the future that standardizes rest of the "C" of the MVC.
    -Mete

  • Pls help   how to check the condition in java server faces.....???

    Hi All
    I have strucked with code pls help....
    How can i check the codition in java server faces.....?
    like in my Application when user provides the in put like some state name in the next page i have to display some url for that state .......if he provide some other state name it will be different url .....pls help me how can i do that,,,,,,???
    thanks in advance..

    There are certainly ways to do that. E.g. using the rendered attribute, using conditional statements in EL, using a specialized getter for that (lazily loaded if necessary), etcetera. But your functional requirement is unclear, so I can't go in detail with that.
    In the future, please try to write normal English sentences. Don't write like SMS talk and save the periods and commas. The more effort you put in your question, the more chance you will be taken for serious and the more effort others will post in their answers.
    Also, in the future, JSF related questions should be posted in the JSF forum.
    Edited by: BalusC on 12-aug-2008 7:47

  • Java server faces submit button

    i'm running a java server faces example in tomcat.In that example i'm having a text field and a submit button, both are visible, but when i run the same example in JBoss app server the submit button is not visible ........whats the problem?
    Thanks in advance.
    Ajay

    Thanks!
    i'm using jwsdp-1.2. Actually there is no need to
    configure anything in jwsdp-1.2. But running example
    out of jwsdp-1.2 may need some configuration that i
    don't know....
    You're correct that some extra steps are needed to run elsewhere than JWSDP 1.2:
    http://java.sun.com/j2ee/javaserverfaces/docs/Deployment_Guide.html
    however, it's very difficult to determine what might be wrong without seeing your JSP source code and associated Java classes, plus any error messages that might be getting written to the log files.
    Craig McClanahan

  • Java Server Faces on BEA

    Hi
    Is it possible to perform Java Server Faces (Sun) on Bea 8.1 Sp4?
    I can't get this started. Do you have any hints/experiences?

    Yes, WLS 8.1 SP4 should support JSF. Unfortunately we do not have an example to get you started. I'll enter a request for such.
    If you encounter issues or have further questions, try our WebApp newsgroup: weblogic.developer.interest.servlet

  • Javascript in java server faces

    Hi All,
    is it possible to use javascript in java server faces. If it is possible, How to get component (textbox, listbox, combo box) values in java script ?

    Yes. Use document.getElementById().

  • Fundamental flaws in Java Server Faces

    Fundamental flaws in Java Server Faces (JSF)
    After working with Struts framework for many years I wanted to try something new and decided to investigate JSF. I was very impressed with my initial evaluation and recently used it in one of my project. Middle of the project I released many glaring issue with the framework and had to break my head to complete the project on time.
    One of the major reasons why I choose JSF was that it had a clean way of mapping a form to a bean(s) and a nice way to perform form actions and navigation between forms.
    Although the framework is very promising in many ways, I think the framework is not yet complete and the developer has to fix lot of holes to make the application to work properly.
    Following are the glaring functionality that is missing or confusing or messed up in JSF.
    1)     JSF does not provide a way to disable PROCESS_VALIDATION phase. For some reason if one wants to skip one phase another, JSF has made it near to impossible to skip.
    2)     The framework does not provide an easy way to invoke an action method directly by calling a URL (Similar to Struts action method invocation). This is very essential because many/most of the time one needs to check the authorizations of the user to view a page.
    3)     JSF does not support form GET method. They are giving all sorts of reasons not to do this. It�s practically very difficult to develop an application with just POST operations.
    4)     There should be an easy way for the developer to tell JSF not to copy the request to the backing bean or at least skip the event phase that copies the request to the backing bean.
    5)     JSF does many operations in each phases. JSF should not overload multiple operations in one phase. Custom validation should be separated from native framework validation. Calling a command button with immediate set to true should be a separate phase event. This should not be mixed with other operation.
    6)     It is very difficult or near to impossible to programmatically unit test JSF application. I don�t know what they thought when they developed this framework. Dude�s we are in the TDD time period, not 4GL.
    7)     In my opinion one or more backing beans can be linked to a page and a page can be made up of one or more jsp�s. The fundamental flaw with the JSF is that JSF tries to dynamically map a jsp collection to beans. I don�t know who decided this model. They should have implemented such that the user in the faces xml or dynamically say what beans maps to a jsp page. Then they can copy the request objects to the bean and then do other stuff. This way the framework will give lot of control to the developer. In my opinion, if they have to do this then they will have to implement the �struts� action controller framework and then extend the JSF framework on top of it.
    8)     The framework has some piece of implementation very easy like mapping the bean to the form and command actions and the others near to impossible to understand or make it to work.
    I am surprised to see big players like IBM and Oracle backing this product. What I don�t understand is why? What are they betting for?
    Anyway, I will definitely keep an eye on the JSF progress. But for now, let me take care of my bum. It was a bumpy ride working with JSF framework.

    I am not very experience or expert in jsf...
    But i would like share my thought/ answer on this issue.
    1) JSF does not provide a way to disable PROCESS_VALIDATION phase. For some reason if one wants to skip one phase another, JSF has made it near to impossible to skip.
    - YES.....jsf make it impossible to disable validation. But it does make it possible to skip some validation with immediate attribute. Anyway..based on My experienc working on immediate attribute.....it was not so easy/flexible to skip the validation as compared to struts..
    2) The framework does not provide an easy way to invoke an action method directly by calling a URL (Similar to Struts action method invocation). This is very essential because many/most of the time one needs to check the authorizations of the user to view a page.
    -I am not sure about this.......But i personally think jsf does not provide this functionality.
    3) JSF does not support form GET method. They are giving all sorts of reasons not to do this. It�s practically very difficult to develop an application with just POST operations.
    - YES....I personally also feel that this is a BIG disadvantage...
    4) There should be an easy way for the developer to tell JSF not to copy the request to the backing bean or at least skip the event phase that copies the request to the backing bean.
    - YES...agreed.....jsf should make this easier..
    5) JSF does many operations in each phases. JSF should not overload multiple operations in one phase. Custom validation should be separated from native framework validation. Calling a command button with immediate set to true should be a separate phase event. This should not be mixed with other operation.
    - No comment..
    6) It is very difficult or near to impossible to programmatically unit test JSF application. I don�t know what they thought when they developed this framework. Dude�s we are in the TDD time period, not 4GL.
    7) In my opinion one or more backing beans can be linked to a page and a page can be made up of one or more jsp�s. The fundamental flaw with the JSF is that JSF tries to dynamically map a jsp collection to beans. I don�t know who decided this model. They should have implemented such that the user in the faces xml or dynamically say what beans maps to a jsp page. Then they can copy the request objects to the bean and then do other stuff. This way the framework will give lot of control to the developer. In my opinion, if they have to do this then they will have to implement the �struts� action controller framework and then extend the JSF framework on top of it.
    - No really understand what u trying to say...But I dun think this should be a isssue...
    8) The framework has some piece of implementation very easy like mapping the bean to the form and command actions and the others near to impossible to understand or make it to work.
    - What is the "other" mean???

  • Recommended portel type for Java Server Faces in Portal 10G

    Hi all,
    What is the best [or recommended] portlet type to use to interact with Java Server Faces in Oracle Portal 10G. We a planning to use a WSRP portlet type in our current project and would like to know if this is a good/feasible approach, or whether another portlet type would be recommended.
    Thanks in advance!

    Entry-level stuff is linked from http://www.jsftutorials.net/
    Samples with tables... eg. the MyFaces examples which show all myfaces components. http://myfaces.apache.org -> just download the binaries and sources and check out the samples
    hth
    Alexander

  • Support for Java Server FAce in Workshop

    Dear All,
    Does anyone have any idea if and when Workshop will include support for the Java
    Server Faces (JSF) framework?
    Thank you
    Abe

    While I cannot share any specific product plans from any vendor, I would like to point out that all of the vendors of IDEs in the Java web application space are members of the JSR-127 expert group that is defining JavaServer Faces. Indeed, one of the primary design goals for the APIs is to ensure that development tools have sufficient information available to create high quality user interfaces at design time, so we're doing all we can to enable this kind of thing.
    As JavaServer Faces matures, I think you will be very pleased with the quality and quantity of tools support for it.
    Craig McClanahan

  • Struts/Java Server Faces

    Plese send info : In which cases it is beter to use struts framework and in which cases Java Server Faces .

    They actually compliment each other. You can use Struts with JSF.
    Read the overview on JSF and you will see.
    Sal

  • Difference between Java Server Faces and Apache Struts

    Hi ,
    I'm quite new to Java Server Faces and Apache Struts. I wonder are they two comparable Frameworks for web presentation?
    And can anybody elaborate please, if they differ in what aspects?
    Thanks
    Jaffar Shaikh

    Here are slides from a presentation by Craig McClanahan that compares them (I believe you can search for other articles on this topic): http://www.baychi.org/calendar/files/Struts-And-Faces/Struts-And-Faces.pdf

  • How to detect remote (client) host name or remote host address?

    Hello!
    I need to receive remote host name or remote IP address in the BSP controller DO_REQUEST method. How to do it?
    In Java I can use getRemoteAddr() or getRemoteHost() methods of HttpServletRequest class. But in the BSP I can not find analogues of these methods.
    Please help
    Best regards,
    Eugeny

    Hi,
    I guess there is something "cleaner", but here is a solution:
    DATA l_host TYPE string.
    l_host = me->request->if_http_entity~get_header_field( '~remote_addr' ).
    Regards,
    Tanguy

  • Java Server Faces - JSF - Problem

    Hi,
    I have a problem to run an example of jsf application!
    I'm using Apache Tomcat/6.0.10 and the application is deployed!
    -------------** Excuse me for my english, I'm Italian **----------
    When I run the application, the browser (Mozilla) show me this error:
    java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
    Can you help me for run correctly this application ?

    The problem is likely that the JSF classes are not available to your application server.

  • Newbie, How Do you transfer a site from Remote Host to Local Web Server

    already exists to my local IIS server. I cannot figure it
    out. I keep going in circles with Manage Sites, creating the folder
    in the Inetpub/wwwroot folder and I need some help to get the whole
    site locally so I can work on it. I use to use Frontpage but my
    developers cannot stand the extra code it puts in and it's not
    google friendly. So I decided to use Dreamweaver to create and
    manage my sites.
    Thanks for all the help in advance.

    In the file panel, view the remote site and select the top
    level folder. Then right click and select get.

  • Java Server Faces best Practices

    Hello,
    I am starting to like JSF. But I want to know the following.
    Where is the contoller in a JSF application, is it the Managed Bean???? or a Backing Bean?
    Should I put my Business Delegate on a Managed Bean? or in a Backing Bean? What is the difference?
    Can anyone tell?.
    I would like to know JSF Best Practices? Blueprints?.
    Thanks.
    Saludos,
    <Rory/>

    Hi Senthruan,
    The documentation referenced by the following links is based on an older version of JavaServer Faces technology.
    Backing Beans:
    http://java.sun.com/webservices/docs/1.3/tutorial/doc/J
    FUsing3.html
    UI Components :
    http://java.sun.com/webservices/docs/1.3/tutorial/doc/J
    FUsing3.html (just as a visual example).You should instead use the J2EE tutorial (http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html), which is based on version 1.1 of JavaServer Faces technology. The JavaSErver Faces material starts with chapter 17. The topics have moved around a bit, but the tutorial has a nice search engine, so you shouldn't have trouble finding the information you need.
    Jennifer

Maybe you are looking for

  • Wireless N Router Model # WRT150N

    I currently have the G series Router and Super Booster. I want to purchase the new N series Router and want to know if it has a compatibel Booster, does it need one, and/or can I use my Wireless G Router Speed Booster with it? Thanks Dr Michael T Nob

  • Data mapping from xRPM 4.0 to BI 7.0

    Hi, Is there a place where I can get the data mapping rules from xRPM 4.0 to BI 7.0. help.sap.com doesn't seem to have the data mapping rules. I checked the BI content for xRPM 3.30 which has some rules. Any help or suggestions will be appreciated. T

  • IDoc Control Record

    We have an issue with one of our scenarios. We are sending an IDoc into our SAP system but we get the message "EDI: Partner profile not available" Now at first this made sense as our logical system in the Partner profiles was FMS but the SLD had the

  • Beginning Oracle Text...

    Could someone perhaps point to a good online source of basic information about how to USE oracle text in searches? I'm specifically looking for information about how to do searches like {woman NOT man}, or whether "woman" will select "women" or wheth

  • Acrobat Pro 8 (Mac OS X 10.8.4) OCR

    Won't OCR more than 27 pages at a time, how to fix this?