VelocityLayoutServlet使用步骤
1. 首先在vm/common创建你的模板
2.在你将要使用的页面引入你的模板
<body>
<div id="header>#parse( 'vm/common/header.vm' )</div>
<div id= "content" >
<div id= "sub" >#parse($sub)</div>
<div id= "main" >$screen_content</div>
</div>
<div id= "footer" >#parse( 'vm/common/footer.vm' )</div>
</body>
例:
- #set($layout = "layout.vm" )
- #set($sub= "vm/user/sub.vm" )