Jade Sitetree - Sitetree

Jade Sitetree - Sitetree
Project Documentation
Module Documentation
Jade Projects

Examples

The Sitetree package has one example located in the ~/examples directory. This example must be deployed in a Java Servlet 2.2 compliant container as the default context. The details of that will depend on your server.

The following directions apply to Tomcat version 3.3.1 starting from the standard "out-of-the-box" configuration.

  1. Copy the example.war file to the %TOMCAT_HOME%/webapps directory
  2. Add a file apps-example.xml to the %TOMCAT_HOME%/conf directory. This file should contain:
    	<?xml version="1.0" encoding="ISO-8859-1"?>
    	<webapps>
    		<Context path="" 
    			docBase="webapps/example" 
    			reloadable="true" 
    			trusted="false" > 
    		</Context>
    	</webapps>
    	
  3. Restart tomcat. You should see debug messages from tomcat telling you that it is deploying example.war.

Once you have the example up and running look at it with a web browser. It should be available at http://localhost:8080. On the left you will see a navigation bar that allows you to move around the "site". The site is actually implemented with only one JSP page. All the places you can navigate to point to the same page. In a real application you would point the Sitetree locations to different pages and include this one (with either a JSP or serverside include) as the implementation of the navigation bar.

If you click to the location /C/B you will see an exhaustive list of links that show the usage of various query parameters and locations and how they appear to the underlying pages. The best way to get a feel for what is going on is to look at the 3 things:

  1. Your browser page
  2. %TOMCAT_HOME%/webapps/example/sitetree/test.jsp: The implementation of the page you are looking at on the browser
  3. %TOMCAT_HOME%/webapps/example/WEB-INF/web.xml for the parameter sitetreeText: This is a string representation of the Sitetree that generated the nav bar.
You can try modifying the text in web.xml to see how it changes the site. You may want to read up on the grammar first.

Once you understand the workings of the example the Usage section should be enough to get you started.


Supported by SourceForge.net Logo