[jboss-user] [EJB/JBoss] - Re: How to retrieve remote IP address of EJB clients?

grego@spiekerpoint.com do-not-reply at jboss.com
Wed Sep 12 13:11:20 EDT 2007


I figured this one out:

	
  | @In
  | private FacesContext facesContext;
  | 
  |  ...
  | 
  | public String someButton() {
  |     Object reqOb = facesContext.getExternalContext().getRequest();
  |     if (reqOb instanceof HttpServletRequest) {
  |         HttpServletRequest req = (HttpServletRequest) reqOb;
  |         String remoteAddr = req.getRemoteAddr();
  | 
  |         ...
  |     }
  | }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4083581#4083581

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4083581



More information about the jboss-user mailing list