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)
- 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.
The detailed instructions of how setup the SiteMesh Starter Kit is also useful to those new to Java Web Application development.
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
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
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,
- You can not mix 32-bit and 64-bit. For example, running Eclipse 32-bit and Java 64-bit will not work.
- Placement of the -vm option is very important. The -vm option must occur before the -vmargs option.
- If everything appears on one line use a better free editor like Notepad++.
Here is an example of what the STS.ini would look like for Windows,
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
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.
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
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.