• Post Reply Bookmark Topic Watch Topic
  • New Topic

Displaying remote IP Address

 
Mike Holpuch
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all,

I am trying to display the user's ip address at the bottom of my jsf page. I thought that would do it, but it displays nothing.

I can get the address to display using , but I want to use jsf, not jsp. Am I using the wrong syntax to display the remoteAddr?
 
Mike Holpuch
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops. Obviously, the emote shouldn't be there.

 
Varun Khanna
Ranch Hand
Posts: 1400
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your backing bean, create a member variable and set it to the IP's value using HttpRequest object.

Your JSP ideally should get the IP's value using backing bean's property.
You may use h utputText component to display it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!