<!--Java Rookie first--
These days learned the framework of the next struts+spring+ibatis+velocity. Get a blog small program, basically count on Jane's, slightly remember it. The advanced stuff is still in the study ...
1, the configuration of Web. <? XML version= "1.0" encoding= "UTF-8"?>
< Web-app xmlns = "Http://java.sun.com/xml/ns/javaee"
Xmlns:xsi = "Http://www.w3.org/2001/XMLSchema-instance" Version = "2.5"
Xsi:schemalocation = "Http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" >
<!--Spring Configuration--
< Context-param >
< Param-name > Context </param-name >
< Param-value >/web-inf/applicationcontext </param-value >
</Context-param >
< servlet >
< Servlet-name > Context </servlet-name >
< Servlet-class >
Org.springframework.web.context.ContextLoaderServlet
</Servlet-class >
< Load-on-startup > 1 </load-on-startup >
</servlet >
<!--Struts Configuration--
< servlet >
< Servlet-name > Action </servlet-name >
< Servlet-class >
Org.apache.struts.action.ActionServlet
</Servlet-class >
< Init-param >
< param-name > Config </param-name >
< Param-value >/web-inf/struts-config.xml </param-value >
</Init-param >
< Init-param >
< param-name > Debug </param-name >
< Param-value > 3 </param-value >
</Init-param >
< Init-param >
< param-name > Detail </param-name >
< Param-value > 3 </param-value >
</Init-param >
< load-on-startup > 0 </load-on-startup >
</servlet >
<!--Velocity Configuration--
< servlet >
< servlet-name > Velocity </servlet-name >
< Servlet-class >
Org.apache.velocity.tools.view.servlet.VelocityLayoutServlet
</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 > 2 </load-on-startup >
</servlet >
< servlet-mapping >
< servlet-name > Velocity </servlet-name >
< Url-pattern > *.htm </url-pattern >
</servlet-mapping >
< servlet-mapping >
< Servlet-name > Action </servlet-name