Jostraca Example: Hello World in Jython
example index
www.jostraca.org
info@jostraca.org

Description:

A simple "hello world" template. This template shows how to embed a text message into the template. The message can be changed in the template script.

Generate Command:

> jostraca -Djython.home=JYTHON_HOME HelloWorld.jtm
(you can also use generate.bat or generate.sh)

Generated Files:

HelloWorld.txt
.jostraca/HelloWorldWriter.py

Experiments:

Try changing the message.
Try changing the generated file name.

NOTE:

The generate.bat and generate.sh scripts require that the JYTHON_HOME environment variable is set to point to the folder containing your Jython installation.

Template Contents:

<% @conf 
<% @conf 
main.JostracaVersion = 0.4
main.TemplateScript  = jython
%>

<% init!
self._setFullFileName( "HelloWorld.txt" )
who = "World"
%>

Hello <%=who%>!

 

Generated File Contents:

Note: only one generated file is shown



Hello World!
 

   example index
   Copyright © 2000-2002 Richard Rodger License.