There are four functions that can be used to get more information about the server in which the servlet is running. Two of them are in the ServletRequest class:
Method Descriptionpublic String getServerName() gets the name of the server in which the servlet is running public int getServerPort() gets the port number of the server in which the servlet is running
The other two functions are defined in the ServletContext class:
Method Descriptionpublic String getServerInfo() gets the server name and version public Object getAttribute() gets a server-dependent attribute
| Last updated 12/26/1999 05:34:42 PM |