Skip to main content

How to know app serv IP from ejb or web service?

2 replies [Last post]
alexbxz
Offline
Joined: 2007-08-08

It is possible to know some parametrs of application server from ejb or web service or servlet? For example IP, app serv's name, http port and ${com.sun.aas.installRoot} parametr.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jluehe
Offline
Joined: 2004-12-01

As for getting some of the info from within a servlet, you can use the following javax.servlet.ServletRequest APIs:

getLocalName()
getLocalAddr()
getLocalPort()

alexbxz
Offline
Joined: 2007-08-08

Thank you jluehe for your reply. But it belong's to servlet only. I would like to know if it is possible in Java EE specification.