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 kelp2 directory for a link to the documentation files.



Running The Sample
  1. Compile the html files using Enhydra's XMLC. You can do this by selecting Tools | XML Compiler and then clicking on Compile.
     
  2. Select Project | Make Project to compile the XMLC generated Java source files and related servlets.
     
  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 Enhydra Deployer. From the IDE menu select Tools | Enhydra Deployer 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
template/conf/bootstrap.conf.in
   Configuration template for configuring Enhydra 4.

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

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

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

template/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.