You could define a switcher action 
  <action-mappings>
   ...
   <action path="/switcher" type="org.apache.struts.actions.SwitchAction">
   ...
 </action-mappings>


Then your global forward could use that:
<global-forwards>
    <forward name="error" path="/switcher.do?prefix=&page=doError.do"/>
</global-forwards>


Regards

Duncan Mills
----- Original Message ----- 
From: Franck Lefebure 
To: 'Struts Users Mailing List' 
Sent: Wednesday, September 24, 2003 8:39 PM
Subject: Multi config files and global forward


Hello,

My web.xml looks like :

<servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
        <param-name>config</param-name>
        <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
        <param-name>config/news</param-name>
        <param-value>/WEB-INF/conf/struts-config-news.xml</param-value>
    </init-param>
    ...............

In /WEB-INF/struts-config.xml , I have the following action :

 <global-forwards>
    <forward name="error" path="/doError.do"/>
  </global-forwards>

  <action-mappings>
    <action path = "/doError" scope="request"
type="com.orange.struts.actions.ErrorAction">
        <forward name="success" path="/error.jsp" redirect="false"/>
    </action>
  </action-mappings>

I want in /WEB-INF/conf/struts-config-news.xml to define  global-forward
towards the /doError.do in the main file :

Something like :

  <global-forwards>
    <forward name="error" path="/../doError.do"/>
  </global-forwards>

But, It doesn't work. If I add redirect="true" : <forward name="error"
path="/../doError.do" redirect="true"/>
Then it's ok But I would like to keep my request scope

An idea ?
Thanks
Franck


--
Franck Lefebure
equipe web http://www.orangecaraibe.com
mailto:[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to