1 | <constant name="struts.velocity.manager.classname" value="struts2.VelocityFixedManager"/> |
1 | struts.velocity.manager.classname = struts2.VelocityFixedManager |
1 2 3 4 5 6 7 8 9 10 11 | <!-- layout.vm -- > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML> <HEAD> <TITLE>${page_title}</TITLE> </HEAD> <BODY> ${screen_content} </BODY> </HTML> |
1 2 3 4 5 6 7 | ## index.vm #set($layout = “layout.vm”) ##选择布局页面 #set($page_title =”Struts2Velocity”) #set($name = “Winter Lau”) <p> Hello <b>$name</b>, Welcome to Struts2 with velocity <br/> </p> |
1 2 3 | <result-types> <result-type name="velocity" class="struts2.VelocityLayoutResult"/> </result-types> |
1 2 3 | <action name="index"> <result type="velocity">/index.vm</result> </action> |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |