模板语言很简单,这里只是提一下
index.vm文件:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Velocity Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="keywords" content="velocity,模板">
</head>
<body >
#set($name1="first!")
Hello, $name1 <br>
Hello, $name2 <br/>
Hello, $name3 <br/>
Hello, $name3
<hr>
<table border='1' width='200' >
<tr>
<td>
yy
</td>
</tr>
#foreach ($iii in $theList)
<tr>
<td bgcolor="#eeeeee">$iii</td>
</tr>