Question

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.

Was it helpful?

Solution

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

OTHER TIPS

You can also use 'monitoredDeployableApps' folder under server profile. You can enable this feature from the admin console -> Applications -> Global deployment settings.

Simple and best way to do this is in two steps: (v 8+)

  1. Enable 'monitoredDeployableApps' feature in Admin Console -> Applications -> Global Deployment Settings and restart the server. (once restart you will see a folder in your profile 'monitoredDeployableApps' (default name and can be changed while enabling this feature)

  2. Drag and Drop your war file in this folder (no restart needed) and observer Systemout.log of the server. Verify in Admin Console for the deployed application.

NOTE: Make sure your context-root is populating to your deployable (war,ear,...) files.

-- Prakash Karri

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top