Link to home
Create AccountLog in
Avatar of aaaaaa
aaaaaa

asked on

how to get websphere port number

i am using websphere application server 5.1.2
i set my 2 application port as 9080, and 9081

in my java code, how can i get the current running application port?
Avatar of HonorGod
HonorGod
Flag of United States of America image

Please provide more information.

You want a Java Application that is running on a WebSphere JVM to determine
the port number that was used to access the resource.  Is this correct?
Avatar of aaaaaa
aaaaaa

ASKER

i got a java application, this is to get the port number of websphere application.
but how to get?
I'm sorry, I must not have been clear enough with my question.

Are you asking:

How should a Java application running on a WebSphere Application Server determine the port number being used?

If this is the case, you need to look into the available on-line documentation that talks about developing Administrative programs in Java.

http://publib.boulder.ibm.com/infocenter/wasinfo/v5r1//index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/welcadminprogram.html

You probably will want to investigate the section entitled:
Create a custom Java admininstrative client program using the Java administrative APIs
http://publib.boulder.ibm.com/infocenter/wasinfo/v5r1//topic/com.ibm.websphere.base.doc/info/aes/ae/tjmx_customjava.html

Is this what you want/need?
Avatar of aaaaaa

ASKER

firstly
when a WebSphere Application Server run,
we can access it by
http://127.0.0.1:9080/myweb or
http://127.0.0.1:9081/myweb  right?

so now my question, my servlet or any java class, how do i know which one above is running?
ASKER CERTIFIED SOLUTION
Avatar of HonorGod
HonorGod
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account