Web. xml
<?xml version="1.0" encoding="UTF-8"?><web-app> <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> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list></web-app>
Hibernate. cfg. xml
<!DOCTYPE hibernate-configuration PUBLIC"-//Hibernate/Hibernate Configuration DTD 3.0//EN""http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
Struts. xml
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"><struts> <package name="default" namespace="/" extends="struts-default"><action name="CourseAction" class="com.snow.action.CourseAction"><result name="success">/course/list.jsp</result><result name="list" type="redirect">CourseAction!list</result><result name="update">/course/update.jsp</result><result name="detail">/course/detail.jsp</result></action><action name="StudentAction" class="com.snow.action.StudentAction"><result name="select">/student/select.jsp</result><result name="center">/student/center.jsp</result></action> </package></struts>
JDBC. Properties
driver=com.mysql.jdbc.Driverurl=jdbc:mysql://192.168.199.140/mymanagerusername=rootpassword=root
User. HBM. xml
<?xml version="1.0"?><!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN""http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">