[repost ]struts2整合velocity
original:http://ift.tt/OeiZpf web.xml文件: <?xml version=”1.0″ encoding=”UTF-8″?> <web-app version=”2.5″ xmlns=”http://ift.tt/Oej10s; xmlns:xsi=”http://ift.tt/OeiZph; xsi:schemaLocation=”http://ift.tt/nSRXKP http://ift.tt/1eXlgKs; <filter> <filter-name>Struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>Struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <servlet> <servlet-name>velocity</servlet-name> <servlet-class> org.apache.velocity.tools.view.servlet.VelocityViewServlet </servlet-class> <init-param> <param-name>org.apache.velocity.toolbox</param-name> <param-value>/WEB-INF/toolbox.xml</param-value> </init-param> <init-param> <param-name> org.apache.velocity.properties </param-name> <param-value> /WEB-INF/velocity.properties </param-value> </init-param> <load-on-startup>10</load-on-startup> </servlet> <servlet-mapping> <servlet-name>velocity</servlet-name> <url-pattern>*.vm</url-pattern> </servlet-mapping> </web-app> struts.xml文件: <?xml version=”1.0″ encoding=”UTF-8″ ?> <!DOCTYPE struts PUBLIC “-//Apache Software Foundation//DTD Struts [...]
via WordPress http://ift.tt/1eXlgu6
via WordPress http://ift.tt/1eXlgu6
Labels: hanhuiwen
0 Comments:
Post a Comment
<< Home