moved HTML rendering from js to server side with freemarker