Websphere

From Kb

Jump to: navigation, search

Contact Article Author | Blog of Article Author | FirstPartners.net Home | LinkedIn profile of Author

Contents

See Also


Stop and Start WebSphere from command line

  • in websphere_install_dir/bin/
    • stopServer server1
    • startServer server1

Log File Locations

  • Main Log file in websphere_install_dir/logs/server1

ManualDeploy War or Ear to Websphere

  1. Stop Existing application
  2. Remove Existing application
  3. Install new application
    • Remember to give domain starting with / - e.g. /NASApp/MyAccount
  1. Start new application

Auto Deploy War or Ear to Websphere

# Auto deploy war/ear file to IBM Websphere
 
# Instructions
# 1) change XXXX to the same cell&node name that you see when you deploy the war/ear through the web console
# 2) change my.war to the war version you have installed / want to install
# 3) change C:/projects/ to where your war file is built by maven
# 4) Go to the websphere bin directory
# 5) Start the server if required (startServer server1)
# 6) Call this file from the command line:  wsadmin -f autodeploy.jacl -lang jacl
#
# Any problems , type 'wsadmin' , and then enter the commands (below) interactively
 
# List current apps
$AdminApp list
 
# stop application (if it exists)
set appManager [$AdminControl queryNames cell=XXXX,node=XXXX,type=ApplicationManager,process=server1,*]
$AdminControl invoke $appManager stopApplication my.war
# uninstall the application
$AdminApp uninstall my.war
 
# save the new server info
$AdminConfig save
 
# install the application
$AdminApp install "C:/projects/my.war" {-server server1 -contextroot /myWebUrlRoot -usedefaultbindings -defaultbinding.force -defaultbinding.virtual.host default_host}
$AdminConfig save
 
# start the application
set appManager [$AdminControl queryNames cell=XXXX,node=XXXX,type=ApplicationManager,process=server1,*]
$AdminControl invoke $appManager startApplication my.war
 
# save the new server info
$AdminConfig save
 
# List current apps
$AdminApp list
 
 
 
 
#############################
# Other Useful commands
#############################
 
# Interactive install
#$AdminApp installInteractive
Personal tools