These examples demonstrate how to create an application server in WebSphere Application Server V4.0 and V6.x.
Creating an application server involves a configuration command. To do this task in the wscp V4.0 tool and the wsadmin V6.x tool, you must know the hierarchical name of the application server. Use the following examples to create an application server:
ApplicationServer create /Node:mynode/ApplicationServer:myserv/ -attribute {{Stdout myfile.out}}
Server objects are contained within nodes.
set node [$AdminConfig getid /Node:mynode/] $AdminConfig create Server $node {{name myserv} {outputStreamRedirect {{fileName myfile.out}}}} $AdminConfig save
node = AdminConfig.getid('/Node:mynode/') AdminConfig.create('Server', node, [['name', 'myserv'], ['outputStreamRedirect', [['fileName', 'myfile.out']]]]) AdminConfig.save()
where Stdout is the name of the V4.0 ApplicationServer attribute that is replaced by the fileName attribute, and embedded within the outputStreamRedirect attribute of the server.
$AdminConfig create Server $node {{name myserv} {adjustPort false}} $AdminConfig saveThe value of the adjustPort parameter is set to true by default. If you set the value of the adjustPort parameter to false, ports will not be made unique by the wsadmin scripting tool.