struts2-struts1-plugin
官方文档
[url]http://struts.apache.org/release/2.3.x/docs/struts-1-plugin.html[/url]
在struts2环境下配置最简单的struts1 action
In the most simple case, where you have a Struts 1 Action that you want to use in Struts 2, configure a Struts 2 action using the wrapper:
[code="java"]
com.mycompany.myapp.MyAction
myAction.jsp
[/code]
访问的时候报错:
[code="java"]
严重: Exception occurred during processing request: null
java.lang.InstantiationException
at sun.reflect.InstantiationExceptionConstructorAccessorImpl.newInstance(InstantiationExceptionConstructorAccessorImpl.java:30)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
[/code]
看了文档,感觉需要注意的应该有
1 To use existing Struts 1 Actions and ActionForms in a Struts 2 application, create a normal Struts 2 configuration package in struts.xml, but have it extend struts1-default. The struts1-default package contains several interceptors and a default interceptor stack that work the plugin into the Struts 2 request process.
这里说需要继承struts1-default
2 This plugin can be installed by copying the plugin jar into your application's /WEB-INF/lib directory. It will need the Struts 1 jar in order to function correctl
相关的 插件jar和strus1相关的jar拷贝到/WEB-INF/lib目录下面
是不是表单数据有问题.processing request: null
异常只有这么一点么?
可以参考下我的博文。
[url]http://angelbill3.iteye.com/blog/1892411[/url]