on 10-23-2008 8:50 PM
Is there any API to read the J2EE server host and port programmatically? I am looking for the hostname where the components are deployed so that I can append the wsdl path to the server and create an URL.
Hi Larry,
there is a standard J2EE Servlet API for your case.
In a servlet or jsp file you can get the host and prot from the request object.
For example in a JSP file :
request.getScheme();
request.getServerName()
request.getServerPort()
You can check the whole API here :
http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletRequest.html#getServerName()
Bets Regards
Bojidar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.