diff --git a/WebRoot/WEB-INF/web.xml b/WebRoot/WEB-INF/web.xml index 0504b34..e52835c 100644 --- a/WebRoot/WEB-INF/web.xml +++ b/WebRoot/WEB-INF/web.xml @@ -1,12 +1,53 @@ Enter + + + org.springframework.web.context.ContextLoaderListener + + + + contextConfigLocation + classpath:applicationContext.xml + + + + openSessionInViewFilter + org.springframework.orm.hibernate4.support.OpenSessionInViewFilter + + sessionFactoryBeanName + sessionFactory + + + + + openSessionInViewFilter + /* + + + + struts2 + org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter + + + + struts2 + /* + + + + index.html - index.htm index.jsp - default.html - default.htm - default.jsp \ No newline at end of file diff --git a/src/main/resources/applicationContext.xml b/src/main/resources/applicationContext.xml new file mode 100644 index 0000000..23bd0a3 --- /dev/null +++ b/src/main/resources/applicationContext.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + com.mysql.jdbc.Driver + + + jdbc:mysql://localhost/enter + + + root + + + passwordword + + + + + + + + + + ${hibernate.dialect} + ${hibernate.show_sql} + ${hibernate.format_sql} + true + ${hibernate.hbm2ddl.auto} + enter + org.springframework.orm.hibernate4.SpringSessionContext + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/config.properties b/src/main/resources/config.properties new file mode 100644 index 0000000..c551f7d --- /dev/null +++ b/src/main/resources/config.properties @@ -0,0 +1,5 @@ +hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect +hibernate.show_sql = true +hibernate.format_sql = true +#hibernate.use_sql_comments = true +hibernate.hbm2ddl.auto = update diff --git a/src/main/resources/struts.xml b/src/main/resources/struts.xml new file mode 100644 index 0000000..59c622a --- /dev/null +++ b/src/main/resources/struts.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + error/error.jsp + + + \ No newline at end of file