The Server object provides access to methods and properties on the server. Most of these methods and properties serve as utility functions.
The createObject method should always be used to create any other COM objects that your class needs to create. Furthermore, if you are creating any other Java objects that are registered with COM and Microsoft® Transaction Server and which support transactions, you should create them using createObject rather than the new operator.
public class Server { public String mapPath(String path); public String URLEncode(String str); public String HTMLEncode(String str); public int getScriptTimeout (); public void getScriptTimeout (int timeout); public Object createObject(String progID); }
public String mapPath(String path);
Maps the specified virtual path–either the absolute path on the current server or the path relative to the current page–into a physical path.
public String URLEncode(String str);
Applies URL encoding rules, including escape characters, to the string.
public String HTMLEncode(String str);
Applies HTML encoding to the specified string.
public int getScriptTimeout( );
public void setScriptTimeout(int timeout);
Specifies the length of time that a script can run before it times out.
public Object createObject(String progID);
Creates an instance of a server component.