You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Laurent MARQUEZ <la...@artal.fr> on 2003/08/13 14:37:41 UTC

SwitchAction Problem -> prefix=??? Page=???

Hi, i want to use switchaction in my 2 struts-config.xml
But i don't understand, How should i configure my struts-config.xml with
SwitchAction?
##############
In struts-config.xml
##############
<action-mappings>
	<action path="/project"
		type="org.apache.struts.actions.SwitchAction"
		prefix="???"
		page="???"/>
</action-mappings>

############## In web.xml ##############
<init-param>
	<param-name>config</param-name>
	<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
	<param-name>config/project</param-name>
	<param-value>/WEB-INF/struts-config-project.xml</param-value>
</init-param>
##############
In tiles-def.xml
##############
<definition name="site.menu.managers"
path="/WEB-INF/jsp/layouts/menu.jsp" >
	<put name="title" value="Useful Links" />
	<putList name="items" >
		<item value="Projects" 
	  		link="/project/manager.do" 	
	
classtype="org.apache.struts.tiles.beans.SimpleMenuItem" />	
	</putList>
</definition>

##############
In struts-config-project.xml
##############
<action-mappings>
	<action    path="/project/manager"
		forward="/WEB-INF/jsp/project/manager.jsp">
	</action>
</action-mappings>

Any help is a blessing.
Laurent.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: SwitchAction Problem -> prefix=??? Page=???

Posted by Raj Atchutuni <ra...@yahoo.com>.
Can you explain what you are trying to accomplish ? 
If you are trying to switch action depending on the 1st action's behavior, you can have
"forward" element pointing to different action-mapping, which passes control to 2nd action irrespective of the location of the action-mapping in multiple config files.


Laurent MARQUEZ <la...@artal.fr> wrote:

Hi, i want to use switchaction in my 2 struts-config.xml
But i don't understand, How should i configure my struts-config.xml with
SwitchAction?
##############
In struts-config.xml
##############

type="org.apache.struts.actions.SwitchAction"
prefix="???"
page="???"/>


############## In web.xml ##############


config


/WEB-INF/struts-config.xml




config/project


/WEB-INF/struts-config-project.xml


##############
In tiles-def.xml
##############
path="/WEB-INF/jsp/layouts/menu.jsp" >





link="/project/manager.do" 

classtype="org.apache.struts.tiles.beans.SimpleMenuItem" /> 




##############
In struts-config-project.xml
##############

forward="/WEB-INF/jsp/project/manager.jsp">



Any help is a blessing.
Laurent.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software