You can use scripting to create an application server.
About this task
Creating an application server involves a configuration command.
Perform the following steps to create a server:
Procedure
- Obtain the configuration ID of the node object.
The
following examples obtain the configuration ID of the node object
and assigns it to the node variable. In these examples,
myNode is the name of the node to which you are
adding the new server.
Using Jacl:
set node [$AdminConfig getid /Node:mynode/]
Using
Jython:
node = AdminConfig.getid('/Node:mynode/')
- There are two ways to create the server using the node
that you specified in the first step. Perform one of the following:
- Using the AdminTask object:
Using Jacl:
$AdminTask createApplicationServer mynode
{-name test1 –templateName default}
Using Jython:
AdminTask.createApplicationServer(mynode,
['-name', 'test1', '-templateName', 'default'])
- Using the AdminConfig object:
Using Jacl:
$AdminConfig create Server $node {{name myserv}
{outputStreamRedirect {{fileName myfile.out}}}}
Using Jython:
AdminConfig.create('Server', node, [['name', 'myserv'],
['outputStreamRedirect', [['fileName', 'myfile.out']]]])
- Save the configuration changes. See the Saving configuration changes with the wsadmin tool article
for more information.