Forward Logo (image)       WebStringTemplates
      Previous Back Back Back Next


WebStringTemplates for the Web Page Designer

You are a Web Page Designer who has been given a Data Interface Definition file like the one shown here and a pointer to this documentation, and have been asked to come back with a web page design. This section of the WebStringTemplates documentation is for you. For completed example files, see the completedExamples sub-directory.

The following pages will cover:

Setup

Checking you have Java V1.4 installed
and installing it if necessary.

To check if you have Java Runtime Edition (JRE) V1.4 installed open a command prompt window and type

java -version

If you see an output like

java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Client VM (build 1.4.2-b28, mixed mode)

then JRE V1.4 is installed correctly. If not then you will have to install it. You can download it free from Sun at http://www.java.com. (Choose either English or all languages). If you are using Mac OSX, you should already have Java installed. If not, check with your support person.

Note: The "Typical" JRE installation installs Sun Java as the plug-in Java for Microsoft Internet Explorer. If you use websites that need the Microsoft JVM instead of Sun's JRE, you will need to open Internet Explorer and choose the menu items, Tools, Internet Options.., Advanced and untick the Java (Sun), Use Java 2 V1.4.2 option and then restart. This option is not used by WebStringTemplates' RunWST.

Running RunWST

Once you have Java V1.4 installed, you can run RunWST to interactively view your web page as you edit the webstringtemplate. If you do not already have the RunWST-1.5.jar file then download it from here. Put the RunWST-1.5.jar file in a convenient directory, usually the directory you will be working in. To run RunWST open a command prompt window and type

java -jar RunWST-1.5.jar

You should see the following output

Usage:
java -jar RunWST-1.5.jar template
uses inputs template.st.html template.data.html output.html
or
java -jar RunWST-1.5.jar template.st data.ext page.out
If output file exists it will be renamed *.*.n before rewriting it.
The output file will be continually updated every 2sec
until q [Enter] or Ctrl-Z [Enter]
are typed in or the Attribute Tree display is closed.

There are two ways to start RunWST, either give your webstringtemplate the same name as the data file, say bookstore.st.html for a data file called bookstore.data.html and then use the command

java -jar RunWST-1.5.jar bookstore

the resulting html file will be called output.html

or you can specify the name of template, data file and output file separately, as in

java -jar RunWST-1.5.jar template.st data.ext page.out

The template file must end in .st and the data file and output file can have any extension you like. If you are using WebStringTemplates to generate non-HTML output, such as Postscript then this is the form of the command you would use.

On the next page you will create your first web page using WebStringTemplates.

Completed Examples

If you want to see a completed example now, open a command prompt where you installed these files, run the following command

java -jar RunWST-1.5.jar manual/completedExamples/bookcatalog

and then open the manual/completedExamples/output.html file in a web browser.


Forward Logo (image)       WebStringTemplates
      Previous Back Back Back Next

Contact Forward Computing and Control by
ęCopyright 2004 Forward Computing and Control Pty. Ltd. ACN 003 669 994