Move rendering instructions out of JavaScript and into JSP page.