Cambridge.getInstance().bindTag(Cambridge.DefaultNamespaceURI, "form").toProvider(new FormTagProvider());
FileTemplateLoader loader = new FileTemplateLoader();
TemplateFactory templateFactory = loader.parseAndCreateTemplateFactory(template, Expressions.cambridgeExpressionLanguage);
Template t = templateFactory.createTemplate();
Form form = new Form();
form.setAction("/test");
form.setMethod(Form.Method.Post);
form.setName("testForm");
ArrayList<FormInput> formInputs = new ArrayList<FormInput>();
formInputs.add(new TextFormInput("username", "text", "username", "User Name"));
form.setInputs(formInputs);
t.setProperty("f", form);
PrintWriter writer = new PrintWriter(System.out);
try {
t.printTo(writer);
writer.flush();
System.out.flush();
} catch (IOException e) {
e.printStackTrace();
}