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

KB16571: How to print the URL of an application via the WebSphere WSAdmin utility


Community Admin

• Strategy


How to print the URL of an application via the WebSphere WSAdmin utility

The following wsadmin script (jacl) can be used to print the URL to access an application installed in WebSphere Application Server while demonstrating how to access an application server's special end points (ports).
 
For more information on WSAdmin, refer to the following IBM WebSphere v6r0 document:
 
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/topic/com.ibm.websphere.express.doc/info/exp/ae/txml_scriptingep.html
 
JACL script for IBM WebSphere WSAdmin
## Assumed variables, adjust accordingly
set appName Strategy
set wc WC_defaulthost
set wcSecure WC_defaulthost_secure
set bsAddr BOOTSTRAP_ADDRESS
###Script assumes index.jsp is the default index page for the application.
set index index.jsp
### Get a list of the currently installed applications
set applications
#### Check if application exists
if { != -1 } {
# Search for app servers.
set cellName ""
set nodeName ""
set serverName ""
foreach c {
foreach n {
foreach s {
set sName
## Use the first app server on the app server list.
set appServ 0]
if { > 0 && $sName == } {
set serverName $sName
set nodeName
set cellName
}
}
}
}
puts "Using Cell $cellName"
puts "Using Node $nodeName"
puts "Using Application Server $serverName"
puts "Will use $wcSecure port for HTTPS port"
puts "Will use $wc for port HTTP port"
puts "Will use $bsAddr host for WAS address"
set node
set serverEntries
set port ""
set host ""
set sport ""
### Find wc port, wcSecure port, and bsAddress host.
foreach serverEntry $serverEntries {
set sName
if {$sName == $serverName} {
set specialEndPoints 0]
foreach specialEndPoint $specialEndPoints {
set endPointNm
set ePoint
if {$endPointNm == $wc} {
set port 0] 1]
}
if {$endPointNm == $bsAddr} {
set host 0] 1]
}
if {$endPointNm == $wcSecure} {
set sport 0] 1]
}
}
}
}
### Check if application is running.
set obj
### If it is empty, it is not running.
if { == 0} {
puts "WARNING: $appName is not running"
}
### Print HTTP and HTTPS URLs for the application.
puts "Address: http://$host:$port/$appName/$index"
puts "Secure Address: https://$host:$sport/$appName/$index"
} else {
puts "Application $appName does not exist"
}
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 23, 2017

Last Updated:

June 23, 2017