This content has been marked as final.
Show 3 replies
-
1. Re: How to figure out port number in weblogic 9.2?
666705 Apr 17, 2007 11:51 AM (in response to 666705)I looked for this information in ServletConfig, in ServletContext, in JVMID
ServletConfig or ServletContext do not have anything (at least I do not see anything),
The newsgroups recommend the following code
public static String getLocalUrlString()
{
String urlString;
JVMID jvmid = JVMID.localID();
urlString = jvmid.getHostAddress();
weblogic.rjvm.Protocol proto
=weblogic.rjvm.Protocol.getDefaultProtocol();
int port = jvmid.getPort(proto);
return urlString + ISoapConstants.SCHEME_DELIMITER + port;
}
I also tried
weblogic.rjvm.Protocol does not exist in current version, and I did not get any real information inside JVMID
Also tried JVMID.localID().ports(), which returns null
System.getProperty("weblogic.system.bindAddr"); or weblogic.system.listenPort property,
getProperty returns null
Tried also another approach from the newsgroups - JwsContext.
...
/** @common:context */
JwsContext context;
...
String myPort = context.getService().getURL().getPort();
String myUrl = context.getService().getURL().toString();
context is null
None of them worked.
Do you have any other ideas?
All those ideas I found in the newsgroups were to the previos version(s) of weblogic - up to 8.1. I have not found anything specific to 9.2 -
2. Re: How to figure out port number in weblogic 9.2?
666705 Apr 24, 2007 5:38 PM (in response to 666705)Login to Weblogic console. At the top left corner, click the Change Center > Lock & Edit. Under Domain Structure, click Environment > Servers. On the right window, click Congiguration Tab > General option. You will see the server port and Ip address. Hope this help.
Mikew -
3. Re: How to figure out port number in weblogic 9.2?
666705 Jul 1, 2008 6:54 PM (in response to 666705)Any luck figuring this out? i need to get the same info during servlet init.