Struts中使用ForwardAction的问题(急死了,在线等了。。。。。。)
配置:
<action path="/test"
type="org.apache.struts.actions.ForwardAction"
parameter="/test2.jsp">
</action>
test.jsp 中就一句话:<a href="test.do">test2</a>
test2.jsp中也一句话: test2
想通过ForwardAction从test.jsp转向test2.jsp以保持struts的MVC风格,
就这样还报错:
java.lang.NoSuchMethodError: org.apache.struts.config.ForwardConfig.setContextRelative(Z)V
org.apache.struts.actions.ForwardAction.execute(ForwardAction.java:103)
org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:53)
org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:64)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:446)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)