2012-03-09 5 views
1

私のstruts-config.xmlには、タイル定義を指すいくつかの前方アクションがあります。定義が指し示すjspではなく、タイルの定義名に解決されるまで、すべてがうまくいくように見えます。タイル-defs.xmlからのstruts-config.xmlのStruts Config with Tiles

<action-mappings> 
    <action name="userTokenForm" path="/createtoken" type="com.bcbst.providertokenweb.actions.CreatetokenAction" 
      scope="request" parameter="action" input="registration.provider.createtoken" validate="true"> 

     <forward name="createtokens" path="registration.provider.createtoken"></forward> 
     <forward name="success" path="registration.provider.success" redirect="false"></forward> 
    </action> 
</action-mappings> 

から

createtokensが前方に呼び出される
<definition name="registration.provider.main" page="/theme/bcbst/template.jsp"> 
    <put name="body" value="/default.jsp"/> 
</definition> 

<definition name="registration.provider.createtoken" page="/theme/bcbst/template.jsp"> 
    <put name="body" value="/createtoken.jsp"/> 
</definition> 

<definition name="registration.provider.success" page="/theme/bcbst/template.jsp"> 
    <put name="body" value="/success.jsp"/> 
</definition> 

、404「を/registration.provider.createtoken doesnの言ってスローされます存在しない。

答えて

0

パスにページ属性を変更しようと

1

次のことを確認してください:

1)あなたは、このようにするActionForwardを返すされています)

return mapping.findForward("createtokens"); 

2あなたをしましたあなたのstruts-config.xmlにtilesプラグインとコントローラプロセッサを追加しますか?

<controller processorClass="org.apache.struts.tiles.TilesRequestProcessor"/> 

<plug-in className="org.apache.struts.tiles.TilesPlugin" > 
    <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" /> 
    <set-property property="moduleAware" value="true" /> 
</plug-in> 

3)これらのJSPファイルは正しい場所(プロジェクトコンテキスト内)にありますか?

/createtoken.jsp

/theme/bcbst/template.jsp