How to get the remote IP address of a client in EJB project?
posted 5 months ago
I've created an Enterprise Application project with an EJB project and one web project and it runs fine. Now I would like to get the IP address of the remote client in the EJB project for some logic in my application. I tried to create a context class in the web part as the following:
And from class in EJB I tried to call the context class like:
My problem is I can't call context.java from EJB class and if I include the classe context in the EJB part I get the NullPointerException. I'v tried also to include the web project in EJB projcet properties and I get the error "Can't add cyclic references". I'm using Netbeans. How can I get the remote IP address in this case?
posted 3 months ago
I Don't know well english you can try with this syntax