Home / TeaVM Patterns and Pitfalls / TeaVM Patterns and Pitfalls     frequal.com

A Basic TeaVM Website

For a basic website, start with the Flavour archetype: TeaVM Flavour archetype (source code)

Edit the HTML in src/main/webapp/index.html.

Add extra elements on the page bound to the user's name, like a "(username) logged in" status indicator. Just add HTML like this:

  <html:text value="userName"/> logged in.
TeaVM looks up the property 'userName' in the class bound to the template, and fills it in automatically.

CSS applies normally, so you can style your page like any other website. The CSS file for the sample project is in src/main/webapp/css/app.css


Last modified on 27 Nov 2018 by AO

Copyright © 2024 Andrew Oliver