Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Add 512M

latest commit 13d2825a20
Jeremy authored July 06, 2012
Octocat-spinner-32 src Add helloworld Java sample September 22, 2011
Octocat-spinner-32 .gitignore Add helloworld Java sample September 22, 2011
Octocat-spinner-32 README.md Update README file June 29, 2012
Octocat-spinner-32 build.xml Set up Ant June 27, 2012
Octocat-spinner-32 manifest.yml Add 512M July 06, 2012
Octocat-spinner-32 maven-build.properties Set up Ant June 27, 2012
Octocat-spinner-32 maven-build.xml Set up Ant June 27, 2012
Octocat-spinner-32 pom.xml Add helloworld Java sample September 22, 2011
README.md

Hello Java Sample

This sample (originally based on the SpringSource sample) aims to demonstrate the simplest possible Servlet-based Java webapp. Here we walk through the entire content of the application.

Building the Application

It is possible to build the application either with Ant or Maven.

Ant

Make sure your have Ant installed. Then, cd into the root directory and execute:

ant clean package

That will create the hello-java-1.0.war file within the 'target' directory.

Maven

Make sure you have Maven installed. Then, cd into the root directory and execute:

mvn clean package

That will create the hello-java-1.0.war file within the 'target' directory.

Running the Application

To run the application, make sure you have the Stackato client installed and that you are logged in successfully for your desired target environment (e.g. http://api.stackato.local).

Then execute:

stackato push -n 

Notice that it detected the app type as "Java Web Application". In this case, it's only recognizing a runtime (Java) but not a framework (e.g. Spring or Grails), since this really is just a barebones Java web application. If you were to create a Spring or Grails application, you would see that it detects both the runtime and the framework.

The result when visiting the 'Application Deployed URL' should look something like this:

Hello from 172.30.49.150:20488

That's all. Have fun!

Something went wrong with that request. Please try again.