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 (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.
Download SpringSource Tool Suite which is a customized version of the Eclipse IDE for Java EE Developers.
Select a drive and directory your computer where you will be keeping everything. This example will use,
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
For development, I choose JDK over JRE as you can actually trace the source of the JDK.
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,
Note the comments have only been tested in Windows.
Here is an example of what the STS.ini would look like for Windows,
-startup plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502 -product com.springsource.sts.ide --launcher.defaultAction openFile --launcher.XXMaxPermSize 384M # --------------------------- # Start Bonsai Framework # ----------------------- # Use local version of Java. # Note, these lines must come just before -vmwargs -vm jdk1.6.0_26\bin\javaw.exe # ----------------------- # End Bonsai Framework # --------------------------- -vmargs -Dosgi.requiredJavaVersion=1.5 -Xmn128m -Xms256m -Xmx768m -Xss1m -XX:PermSize=128m -XX:MaxPermSize=384m
See Specifying the JVM at the Eclipse Wiki for more details.
Start Eclipse by running the STS executable.
The selected workspace will be,
Check "Use this as the default and do not ask again"
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.
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.
SiteMesh is then setup following the first two tutorials, Setup SiteMesh in 5 Minutes or Less and Start Using SiteMesh in 10 Minutes.
I was able to successfully package the environment using 7-Zip. Other tools may work too, but this has been tried and tested.