Show me the code! – By Davanum Srinivas

October 8, 2011

Quick Start for WebSphere Liberty Profile – Deploying a WAR

Filed under: Uncategorized — Davanum Srinivas @ 12:58 pm

Download the WebSphere Application Server V8.5 Alpha Liberty Profile from:
https://www.ibm.com/developerworks/mydeveloperworks/blogs/wasdev/entry/download?lang=en

Create a new web app using maven:
http://maven.apache.org/guides/mini/guide-webapp.html

Unzip the server:

dims@dims-desktop:~$ unzip -q Downloads/was4d-20110927-1211.zip

Let’s use the default server for deploying our war

dims@dims-desktop:~$ cd was4d/usr/servers/defaultServer/

See which features are enabled

dims@dims-desktop:~/was4d/usr/servers/defaultServer$ cat server.xml
<server description="new server">

<!-- Enable features -->
<!--
<featureManager>
<feature>servlet-3.0</feature>
</featureManager>
-->

</server>

Add support for servlet and jsp’s

dims@dims-desktop:~/was4d/usr/servers/defaultServer$ vi server.xml
dims@dims-desktop:~/was4d/usr/servers/defaultServer$ cat server.xml
<server description="new server">

<!-- Enable features -->
<featureManager>
<feature>servlet-3.0</feature>
<feature>jsp-2.2</feature>
</featureManager>

</server>

Create a directory for dropping in our WAR

dims@dims-desktop:~/was4d/usr/servers/defaultServer$ mkdir dropins
dims@dims-desktop:~/was4d/usr/servers/defaultServer$ cd dropins/
dims@dims-desktop:~/was4d/usr/servers/defaultServer/dropins$ cp ~/my-webapp.war .
dims@dims-desktop:~/was4d/usr/servers/defaultServer/dropins$ cd ../../../..

Start the server

dims@dims-desktop:~/was4d$ date
Sat Oct 8 13:50:50 EDT 2011
dims@dims-desktop:~/was4d$ bin/was4d start
Starting defaultServer ...
OK.

Let’s see how long it took…just a few seconds.

dims@dims-desktop:~/was4d$ date
Sat Oct 8 13:50:56 EDT 2011

That’s it, point your browser to http://localhost:9080/my-webapp/

More information can be found at:
https://www.ibm.com/developerworks/mydeveloperworks/blogs/wasdev/entry/announcing_the_was_v8_5_alpha1?lang=en

About these ads

3 Comments »

  1. How can I find out on which port it is runnning? When started I see that the server status as running. I checked the logs and I do not see any process/port listed on the process window.

    Comment by Pattabi — October 10, 2011 @ 1:20 pm

    • Please ignore my question. I did not deploy the application. Looks cool!

      Comment by Pattabi — October 10, 2011 @ 1:45 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Shocking Blue Green Theme Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 131 other followers

%d bloggers like this: