How to deploy war on websphere 8 without using Admin Console?

ashishjmeshram picture ashishjmeshram · Jan 9, 2012 · Viewed 12.5k times · Source

How do we a deploy a simple war file on the websphere server 8 without using the websphere administration console?

As a part of the manual deployment I will need to know,

  1. where to put the war file manually on the server?
  2. war uses jndi for db connection, since we do not want to use admin console, how do we create jndi data sources?
  3. we would also want to externalize the properties file. (like I used to keep application.properties in JBOSS_HOME/server/default/conf folder in jboss instead of the app.war/web-inf/classes)

Please help

PS: Actually we will be having an ant build which will do these three things for us so that we don't have to go to the admin console. Just run the ant build and it will copy war, create jndi etc stuff.

Answer

Aviram Segal picture Aviram Segal · Jan 11, 2012

The best way of doing what you want is writing a wsadmin script.

Using wsadmin you can deploy, add/delete/modify resources in WebSphere, pretty much anything.

I would suggest you read Getting started with wsadmin scripting