EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB16567: How to locate the path of where applications are installed via the WebSphere WSAdmin utility


Community Admin

• Strategy


Sometimes it is needed to have access to the location where applications are installed when creating wsadmin scripts. The following wsadmin script (jacl) will resolve the Environmental Variable "APP_INSTALL_ROOT" and print out the path where applications are installed.

Sometimes it is needed to have access to the location where applications are installed when creating wsadmin scripts. The following wsadmin script (jacl) will resolve the Environmental Variable "APP_INSTALL_ROOT" and print out the path where applications are installed.
 
JACL script for IBM WebSphere WSAdmin
# Search for the node of the first app servers in the app server list
set cellName ""
set nodeName ""
foreach c {
foreach n {
foreach s {
set sName
set appServ 0]
if { > 0 && $sName == } {
set nodeName
set cellName
}
}
}
}
puts "Using Cell $cellName"
puts "Using Node $nodeName"
### Retrieve the value of the variable. Assuming node scope.
proc getNodeScopeVariable { varName } {
global AdminConfig
global nodeName
set node
set varSubstitutions
foreach varSubst $varSubstitutions {
set getVarName
if { == 0} {
set res
return $res
}
}
}
### Recursively resolve the variable.
proc resolve { str } {
set i
set j
# Check if there is an opening bracket for a variable.
if {$i != -1} {
set subVar ]
set subVarValue
set str $j $subVarValue]
# Continue resolving variables if there are more
if { != -1} {
set str
}
}
return $str
}
set var APP_INSTALL_ROOT
set res ]
puts "$var: $res"
Third Party Software Installation
WARNING:
The third-party product(s) discussed in this technical note is manufactured by vendors independent of Strategy. Strategy makes no warranty, express, implied or otherwise, regarding this product, including its performance or reliability.
 


Comment

0 comments

Details

Knowledge Article

Published:

June 29, 2017

Last Updated:

June 29, 2017