Kelp Web Application


This sample demonstrates some basic features of XMLC and shows how to run servlets using Enhydra.

Please review the Kelp documentation before running this project. See the readme.html file in the kelp1.2 directory for a link to the documentation files.



Running The Sample
  1. If you are running with the Enhydra 4 alpha 3 release, add a library containing j2ee.jar to the project and use JDK 1.2.2.
     
  2. Compile the html files using Enhydra's XMLC. You can do this by selecting Wizards | XMLC Compiler and then clicking on Compile.
     
  3. If you are already using port 9000, you will first need to modify the following entry in the servlet.conf.in configuration template to
    Connection.http.Port = 9000
    
  4. Deploy the application using the Local Deployment wizard. From the IDE menu select Wizards | Local Deployment and then click on Deploy. This deploys configuration files for the application.
     
  5. Select Run | Run Project to start the Enhydra application server.
     
  6. From a web browser, enter:

    http://localhost:9000
     

Sample Pages

The Files
test/servlet/kernel.conf.in
   Configuration template for configuring the Enhydra kernel.

test/servlet/servlet.conf.in
   Configuration template for the Enhydra web container service.

test/data/form.properties
   Data store for the Form servlet.

test/data/newnode.txt
   HTML span that is added to the New Node servlet at runtime.

test/java.policy
   Policy file to provide all rights to Enhydra services.

src/web-inf/web.xml.in
   Deployment descriptor template.

src/kelp/sample/webapp/resources/Form.html
   XMLC template for Form servlet.

src/kelp/sample/webapp/resources/Greeting.html
   XMLC template for Greeting servlet.

src/kelp/sample/webapp/resources/NewNode.html
   XMLC template for New Node servlet.

src/kelp/sample/webapp/resources/Table.html
   XMLC template for Table servlet.

src/kelp/sample/webapp/presentation/FormServlet.java
   Servlet that stores form entry values to a properties file.

src/kelp/sample/webapp/presentation/GreetingServlet.java
   Servlet that updates a span of text with a input parameter from a deployment descriptor.

src/kelp/sample/webapp/presentation/NewNodeServlet.java
   Servlet that adds the contents of a text file to a web page.

src/kelp/sample/webapp/presentation/TableServlet.java
   Servlet that populates an HTML table at runtime.

readme.html
   This file which is not an XMLC template.