Struts2.1.2配置笔记

1. 首先不用说了在web.xml中加入struts2的监听器:




struts2
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter



struts2
/*

2. 在src中随便写一个struts.xml (会自动放入classes中)










/pages/leaveApplication/index.jsp




3. 加jar包 这个最郁闷了

commons-fileupload-1.2.1.jar
(报错信息:Unable to load configuration. - bean XXXXXstruts2-core-2.2.1.1.jar!/struts-default.xml:48:178)
commons-io-1.3.2.jar
(https://www.360docs.net/doc/0310968686.html,ng.NoClassDefFoundError: org/apache/commons/io/output/NullOutputStream)
commons-logging-1.0.4.jar
freemarker-2.3.16.jar
javassist-3.7.ga.jar (此文件在struts-2.2.1/lib下是没有的,需要在struts-2.2.1/apps/struts2-blank-2.2.1.war下的lib中找。)
(https://www.360docs.net/doc/0310968686.html,ng.RuntimeException: https://www.360docs.net/doc/0310968686.html,ng.reflect.InvocationTargetException)
ognl-3.0.jar
(报错信息:Unable to load configuration. - bean XXXXXstruts2-core-2.2.1.1.jar!/struts-default.xml:71:140)
struts2-core-2.2.1.1.jar
xwork-core-2.2.1.1.jar

真是缺一不可啊!

相关文档
最新文档