我的时区下午好。使用Apache Tiles
我正在生产一年以上的项目,应用服务器正在运行J2EE 1.3版本。现在我正尝试使用apache tiles框架将内容从布局中分离出来。在WEB-INF/lib中实现STRUTS框架的以下库: -struts1.2.6 -struts-core-1.3.10 -struts-extras-1.3.10.jar -struts-taglib-1.3.10。罐子
此介绍我的噩梦开始后: 1)配置I下面的代码添加到我的瓷砖struts-config.xml中:
<action path="/tilesTest"
parameter="aDef"
type="org.apache.struts.actions.ForwardAction" />
<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor" />
<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="definitions-config" value="/WEB-INF/tilesdefs.xml" />
<set-property property="moduleAware" value="true" />
</plug-in>
'aDef'参数在tilesdefs.xml中定义。 当我打电话在浏览器中的作用,它引发了我以下异常:
java.lang.NoSuchMethodError:org.apache.struts.config.ForwardConfig.getContextRelative()z org.apache.struts.tiles .TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:289)
调查后,我发现一个帖子说以下内容:
经过申请lib文件夹中找到的struts-核心1.3.8.jar以及的struts.jar。正因为如此,抛出了异常。 struts.jar有forwardConfig类和getContextRelative()方法。 struts-core-1.3.8.jar有forwardConfig类,但没有getContextRelative()方法。 这是造成这个问题。 因此删除struts.jar以便使用1.3.8版本。 - 另外添加的struts-额外-1.3.8.jar到应用的lib
就像我在乞讨,我有两个相同的库说,唯一的问题是,它是的struts.jar LIB有tiles包,struts-core-1.3.8没有那个包。 那么我想要做什么,在这个应用程序中运行瓷砖?我不得不解释所有情况。 致以问候 感谢任何试图帮助我的人
你试图运行什么版本的瓷砖?你为什么要把Struts 1.2.6和Struts 1.3.10结合起来?首先,选择一个Struts版本。 – 2012-01-09 19:08:37