Helma logo
helma.org » Home > docs > tutorial > Preparing Helma

Preparing Helma

I assume you already managed to install a recent version of Helma and that it is now up and running.

First of all, you have to tell Helma about your new application. Add a line with a more or less meaningful name (e.g. addressbook) to the file apps.properties in the Helma installation directory (you might find some lines containing other application names already):

apps.properties:

# List of apps to start.

base
base.mountpoint = /

manage

addressbook
Helma will now create a new folder in the apps directory called addressbook, inside of which you will later place the Javascript files and skins that define your application.

The application's name is also the first part of the URL path if you want to access the application from a browser. If Helma is running with the default settings, you should be able to request the URL http://localhost:8080/addressbook/.

However, there is nothing there yet and you only will get an error message stating "Error in application 'addressbook': Action not found". Since the request didn't reference a particular HopObject and/or specify a specific action, Helma was looking for the "main" action of the "root" HopObject, which you have not yet specified.

This main action will later contain the code that generates a page listing your address book entries. For now, you may just create the following main action, in order to verify that your otherwise empty addressbook application is configured correctly.

apps/addressbook/Root/main.hac:
res.data.title = "Helma Address Book";
renderSkin("html");
This action attempts to render a skin named "html", which you create inside the "Global" directory:

apps/addressbook/Global/html.skin:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
   <title><% response.title %></title>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="white">

Under development: <% response.title %>

</body>
</html>
Instead of the above mentioned error message, you should now receive the following response.

Under development: Helma Address Book


Up: Tutorial
Next: Database Connection

... comment


Page last modified on 2005-11-10 15:38 by czv

 
misterweaver, Wednesday, 21. November 2007, 20:57
I would like to download this complete example but I do not see that it is attached. It would be nice to have a download for the example.

... link  


... comment