|
Question |
How do I set a webcontainer custom property on IBM®
WebSphere® Application Server? |
|
|
|
Answer |
To set a webcontainer custom property on IBM WebSphere
Application Server Version 6:
- In the administrative console, click "Servers" and under Servers click
"Application Servers"
- Click on the server to which the custom property is to be applied
- Under "Configuration" and "Container settings" click "Web Container
Settings" and under Web Container Settings click "Web Container"
- Under "Configuration" and "Additional Properties" click "Custom
Properties"
- In the Custom Properties page, click "New"
- In the settings page, enter the name of the custom property to be
added in the "Name" field and the value to be set for the custom property
in the "Value" field. Note that some properties are case sensitive.
- Click "Apply" or "OK"
- Click "Save" in the "Messages" box that appears
- Restart the server for the custom property to take effect
To set a webcontainer custom property on WebSphere Application Server
Version 5:
- In the administrative console, click "Servers" and under Servers click
"Application Servers"
- Click on the server to which the custom property is to be applied
- Under "Configuration" and "Additional Properties" click "Web
Container
- Under "Configuration" and "Additional Properties" click "Custom
Properties"
- In the Custom Properties page, click "New"
- In the settings page, enter the name of the custom property to be
added in the Name field and the value to be set for the custom property in
the Value field. Note that some properties are case sensitive.
- Click "Apply" or "OK"
- Click "Save" in the "Message(s)" box that appears
- In the Save to Master Configuration panel, click "Save"
- Restart the server for the custom property to take effect.
To set a webcontainer custom property on WebSphere Application Server
Version 5 or Version 6 using wsadmin:
- Create a jacl script to add/update the custom property.
- Ensure that the server is running.
- Run the jacl script in wsadmin using "wsadmin -f
<scriptName>.jacl
- Restart the server for the custom property to take effect.
An example jacl script which creates a webcontainer custom property,
after deleting any current instances of the property being added, might
contain the following but with lines 2 to 6 modified to specify
appropriate values for <cell of server>, <node of server>,
<server to create property for>,
<webcontainer property name> and <webcontainer property
value>:
# set variables
set cellName <cell of server>
set nodeName <node of server>
set serverName <server to create property for>
set propertyName <webcontainer property name>
set propertyValue <webcontainer property value>
# define some helper variables
set a1 [list name $propertyName]
set a2 [list value $propertyValue]
set attrs [list $a1 $a2]
# get server config
set server [$AdminConfig getid
/Cell:$cellName/Node:$nodeName/Server:$serverName/]
#get the webcontainer config from the server config
set webcontainer [$AdminConfig list WebContainer $server]
# get a list of existing webcontainer properties
set webcontainerProperties [$AdminConfig list Property $webcontainer]
# Check for existing properties with the same name and delete if found
if { ${webcontainerProperties} != "" } {
foreach propertyID ${webcontainerProperties} {
set propertyIDName [$AdminConfig showAttribute $propertyID name]
set match [string match $propertyIDName $propertyName]
if { ${match} == 1 } {
$AdminConfig remove $propertyID
}
}
}
# Create the specified property
$AdminConfig create Property $webcontainer $attrs
# Save updates
$AdminConfig save |
|
|
|
|
Cross Reference information |
Segment |
Product |
Component |
Platform |
Version |
Edition |
Application Servers |
WebSphere Application Server for z/OS |
Servlet Engine/Web Container |
OS/390, z/OS |
6.1, 6.0.1, 6.0, 5.1, 5.0 |
|
Business Integration |
WebSphere Business Integration Server Foundation |
Not Applicable |
AIX, Linux, Solaris, Windows |
5.1.1, 5.1, 5.0 |
|
Business Integration |
WebSphere Business Integration Server Foundation for z/OS |
Not Applicable |
z/OS |
5.0, 5.1, 5.1.1 |
|
|
|
|