PortManagement command group for the AdminTask object
You can use the Jython or Jacl scripting languages to configure servers with the wsadmin tool. The commands and parameters in the PortManagement group can be used to list and modify application and server ports. The PortManagement command group for the AdminTask object includes the following commands:
listApplicationPorts
Use the listApplicationPorts command to list the ports in order to access a particular application.
Target object
The application name.
Parameters and return values
- Parameters: None
- Returns: The ports that are used by the application specified.
Examples
Interactive mode example usage:
- Use Jacl:
$AdminTask listApplicationPorts {-interactive}
- Use Jython string:
AdminTask.listApplicationPorts ('[-interactive]')
- Use Jython list:
AdminTask.listApplicationPorts (['-interactive'])
listServerPorts
Use the listServerPorts command to list the ports that are used by the server specified.
Target object
The server name (String)
Parameters and return values
- -nodeName
- The name of the node. This parameter is only required when the server name is not unique in the cell. (String, required)
Examples
Batch mode example usage:
- Use Jacl:
$AdminTask listServerPorts server1 {-nodeName myNode}
- Use Jython string:
AdminTask.listServerPorts ('server1', '[-nodeName myNode]')
- Use Jython list:
AdminTask.listServerPorts ('server1', ['-nodeName', 'myNode'])
Interactive mode example usage:
- Use Jacl:
$AdminTask listServerPorts {-interactive}
- Use Jython string:
AdminTask.listServerPorts ('[-interactive]')
- Use Jython list:
AdminTask.listServerPorts (['-interactive'])
modifyServerPort
Use the modifyServerPort command to modify the port that is used by the server.
Target object
The server name.
Parameters and return values
- -nodeName
- The name of the node. (String, required)
- -endPointName
- The name of the port. (String, required)
- -port
- The port number. (Integer, required)
Examples
Batch mode example usage:
- Use Jacl:
$AdminTask modifyServerPort server1 {-nodeName myNode -endPointName port1 -port 5566}
- Use Jython string:
AdminTask.modifyServerPort ('server1', '[-nodeName myNode -endPointName port1 -port 5566]')
- Use Jython list:
AdminTask.modifyServerPort ('server1', ['-nodeName', 'myNode', '-endPointName', 'port1', '-port', '5566'])
Interactive mode example usage:
- Use Jacl:
$AdminTask modifyServerPort {-interactive}
- Use Jython string:
AdminTask.modifyServerPort ('[-interactive]')
- Use Jython list:
AdminTask.modifyServerPort (['-interactive'])
Related tasks
Use the AdminTask object for scripted administration
Related Reference
Commands for the AdminTask object
Reference topic