Hi guys, I was hoping if anyone cud help me with struts SwitchAction. I am using struts 1.1 and scaffold.
I have two modules, customer and utilities. I am switching an action from * struts-config-utilities.xml* to *struts-config-customer.xml* , the jsp in customer module is loaded and the beans are executed. But when I try to invoke another action (*/listCustomerAdvancedProfile*) from the JSP in customer, it says invalid path. *" HTTP Status 400 - Invalid path /listCustomerAdvancedProfile was requested "* I found out that my module is not switched. When i debugged , the module name still shows *utilities *, it should actually be "*customer*" . So any action I invoke in customer JSP is taken as *\utilities\action.do* . I dont know why the module name switching is not happening although action is switched correctly. here are my codes. I am submitting the action thru Javascript from a JSP page in utilities module and here is action that I submit. * /actionSwitcherScoreCommand.do?prefix=/customer&page=/scoreCustomerRegistrationNew.do * prefix = customer (module) page = /scoreCustomerRegistrationNew.do* ( action present in struts-config-customer.xml )* * * * * *struts-config-utilities.xml * *<action path="/actionSwitcherScoreCommand"* * **type="org.apache.struts.actions.SwitchAction"/>* *struts-config-customer.xml * * * * <action path="/scoreCustomerRegistrationNew" type="com.tito.struts.LRProcessBridgeActionSpring" parameter="scoreCustomerProfileRead" name="gXXLRCustomerRegistrationForm" scope="request" validate="false"> <forward name="success_en" path="/jsp/en/CustomerRegistration.jsp"/> <forward name="failure_en" path="/jsp/en/CustomerError.jsp"/> </action> <action path="/listCustomerAdvancedProfile" type="com.tito.struts.LRProcessBridgeActionSpring" parameter="customerProfileAdvancedRead" name="gXXLRCustomerRegistrationForm" scope="request" validate="false" input="/listCustomerAdvancedProfileErr.do"> <forward name="success_en" path="/jsp/en/CustomerRegistrationAdvanced.jsp"/> <forward name="failure_en" path="/jsp/en/CustomerError.jsp"/> JSP CustomerRegistration.jsp in the customer module gets loaded OK. Now the problem is , from this JSP if i invoke an action , the action path is taken as utilities/action.do , instead of customer/action.do , As far as my understanding , it shud switch the module rt ? Can you help me out please ? Is there anything else I need to do to switch action. When I googled , i only found that I need to call switchAction in my action mapping and give * regards, Tito Cheriachan ___________________________________________ Automate Twittering using AutoTweeter http://www.autotweeter.in <http://www.autotweeter.in>Follow twitter users automatically with AutoFollower http://www.twitterautofollower.com --