如何获得Websphere 6.1的端口号
答
servlet API为您提供HttpServletRequest中的本地端口。
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
PrintWriter writer = response.getWriter();
writer.write("" + request.getLocalPort());
writer.close();
}
这些端口在节点的serverindex.xml定义(例如,[WAS] /profiles/AppSrv01/config/cells/localhostNode01Cell/nodes/localhostNode01/serverindex.xml)。
<specialEndpoints xmi:id="NamedEndPoint_1214751102556" endPointName="WC_defaulthost">
<endPoint xmi:id="EndPoint_1214751102556" host="*" port="9080"/>
我不确定WAS JMX支持是否公开此信息 - 您必须检查文档。
答
如果使用RAD你可以从IDE运行管理控制台,然后发现所使用的所有端口WAS
你是什么意思与应用端口?你的意思是http端口,就像80,8080端口一样... – 2008-11-05 10:48:16