struts2 包导进来
<!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter" /> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0" /> <v:f eqn="sum @0 1 0" /> <v:f eqn="sum 0 0 @1" /> <v:f eqn="prod @2 1 2" /> <v:f eqn="prod @3 21600 pixelWidth" /> <v:f eqn="prod @3 21600 pixelHeight" /> <v:f eqn="sum @0 0 1" /> <v:f eqn="prod @6 1 2" /> <v:f eqn="prod @7 21600 pixelWidth" /> <v:f eqn="sum @8 21600 0" /> <v:f eqn="prod @7 21600 pixelHeight" /> <v:f eqn="sum @10 21600 0" /> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" /> <o:lock v:ext="edit" aspectratio="t" /> </v:shapetype><v:shape id="图片_x0020_1" o:spid="_x0000_i1025" type="#_x0000_t75" style='width:6in;height:86.25pt;visibility:visible'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image001.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--> struts.xml 放在src下
<!--[if gte vml 1]><v:shape id="_x0000_i1026" type="#_x0000_t75" style='width:6in;height:67.5pt; visibility:visible'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image003.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->然后web.xml StrutsPrepareandExcuteFilter
<!--[if gte vml 1]><v:shape id="_x0000_i1027" type="#_x0000_t75" style='width:6in;height:54pt; visibility:visible'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image005.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
Spring 包导进来 3个包
<!--[if gte vml 1]><v:shape id="_x0000_i1028" type="#_x0000_t75" style='width:6in;height:102.75pt; visibility:visible'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image007.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if gte vml 1]><v:shape id="_x0000_i1029" type="#_x0000_t75" style='width:6in;height:53.25pt; visibility:visible'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image009.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
然后在web.xml加入监听器
<!--[if gte vml 1]><v:shape id="_x0000_i1030" type="#_x0000_t75" style='width:6in;height:142.5pt; visibility:visible'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image011.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
Hibernate 包导进来
<!--[if gte vml 1]><v:shape id="_x0000_i1031" type="#_x0000_t75" style='width:6in;height:39.75pt; visibility:visible'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image013.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if gte vml 1]><v:shape id="_x0000_i1032" type="#_x0000_t75" style='width:6in;height:129.75pt; visibility:visible'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image015.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]--> 有包冲突留高版本的
<!--[if gte vml 1]><v:shape id="_x0000_i1033" type="#_x0000_t75" style='width:240.75pt;height:323.25pt; visibility:visible'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image017.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
把事务引进去 applicationContext-xxxxxx.xml
<!--[if gte vml 1]><v:shape id="_x0000_i1034" type="#_x0000_t75" style='width:6in;height:136.5pt; visibility:visible'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image018.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
还有log4j.properties hibernate.cfg.xml 放入src下
<!--[if gte vml 1]><v:shape id="_x0000_i1035" type="#_x0000_t75" style='width:6in;height:143.25pt; visibility:visible'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image020.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
<!--[if gte vml 1]><v:shape id="_x0000_i1036" type="#_x0000_t75" style='width:289.5pt;height:447pt; visibility:visible'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image022.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
导包 : 别忘了
1Struts2-Spring-plugin.jar
<!--[if gte vml 1]><v:shape id="_x0000_i1037" type="#_x0000_t75" style='width:6in;height:78.75pt; visibility:visible'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image023.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
2mysql-connector.jar
<!--[if gte vml 1]><v:shape id="_x0000_i1038" type="#_x0000_t75" style='width:6in;height:146.25pt; visibility:visible'> <v:imagedata src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image025.png" o:title="" /> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
3OpenSessionInViewFilter ( 查找下 是spring提供的,放在struts2prepareandexcuteFilter前面) 延迟session的关闭