freemarker输出html页面问题
问题描述:
1.项目下有一个hello.jsp
内容
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
${user}
</body>
</html>
2.有一个java类已经能在控制台输出数据填充完毕的页面数据
Template temp = cfg.getTemplate("hello.jsp");
/* 创建数据模型 */
Map<String, Object> root = new HashMap<String, Object>();
root.put("user", "Big Joe");
/* 将模板和数据模型合并 */
Writer out = new OutputStreamWriter(System.out);
temp.process(root, out);
out.flush();
请问我如何在浏览器中调用 展示页面。