Skip to end of metadata
Go to start of metadata

The SSK (SiteMesh Starter Kit) eventual goal is to create a portable development environment.

At present, v0.1 is simply a bundling of an Java Editor, Application Server and Java which does not require an install.

It is composed of the following components,

  • SpringSource Tool Suite (a variant of Eclipse)
  • Java
  • vFabric tc Server (a variant of Tomcat)

SpringSource Tool Suite (STS)  was selected over Eclipse as it comes pre-packaged with a version of Tomcat.

With v0.1, the user can download the SSK and import the demo cafe.war and have SiteMesh running within a few minutes.

The detailed instructions of how setup the SiteMesh Starter Kit is also useful to those new to Java Web Application development.


Note, the SSK is not truly portable yet. SpringSource Tool Suite hard codes path names. The current work-around is to have users import the demo war file.

Eclipse Setup

Download SpringSource Tool Suite which is a customized version of the Eclipse IDE for Java EE Developers.

Select Location

Select a drive and directory your computer where you will be keeping everything. This example will use,

  • Windows = C:\apps\
  • Linux = /opt/apps/

Setup Package Java

Download Oracle's JDK (Java Development Kit) and follow the Manual Java Setup Instructions for Windows or Manual Java Setup Instructions for Linux.

Move the Java folder into your eclipse directory. For example using JDK 1.6.0_26

  • Windows = C:\apps\sts-2.8.0.RELEASE\jdk1.6.0_26
  • Linux or Unix = /opt/apps/sts-2.8.0.RELEASE/jdk1.6.0_26

For development, I choose JDK over JRE as you can actually trace the source of the JDK.

Point STS to Java

Modify the STS.ini to point to your JRE with by adding -vm and a reference to Java.

Two key thing to keep in mind,

  1. You can not mix 32-bit and 64-bit. For example, running Eclipse 32-bit and Java 64-bit will not work.
  2. Placement of the -vm option is very important. The -vm option must occur before the -vmargs option.
  3. If everything appears on one line use a better free editor like Notepad++.

Note the comments have only been tested in Windows.

Here is an example of what the STS.ini would look like for Windows,


Launch Eclipse

Start Eclipse by running the STS executable.

The selected workspace will be,

  • Windows = ..\workspace-sitemesh\
  • Linux = ../workspace-sitemesh/

Check "Use this as the default and do not ask again"

Create Web Work Space


Stopped here. For portability this does not work. As soon as the web application workspace is created, the tomcat server is bound to the current working directory. Will post questions at SpringSource, Eclipse and Tomcat to see if this can made to be relative paths.

In STS click,

File, New, Dynamic Web Project

You will be prompted with a Dynamic Web Project dialog box. Leave everything as default and enter cafe as the Project Name.

Click Next to proceed to the Java dialog box.

Click Next o proceed to the Web Module dialog box and check the box beside Generate web.xml deployment descriptor.

Click Finish.

You will be prompted to switch to the Java EE perspective. Click Remember my decision and then click Yes.

Optionally, I prefer to use the Navigator which shows the real file system,

Window, Show View, Navigator


The Environment is now ready for use.

Setup SiteMesh

SiteMesh is then setup following the first two tutorials, Setup SiteMesh in 5 Minutes or Less and Start Using SiteMesh in 10 Minutes.

Packaging the Portable Development Environment

I was able to successfully package the environment using 7-Zip. Other tools may work too, but this has been tried and tested.

  • No labels