What I did is the following. I have a master jsp and in this jsp I inserted the following page. <tile:insert controllerUrl="/viewNavigation.do" page="/jsp/myJspPage.jsp"/> Now there are two important things to consider. First in your action mapping definition in this case viewNavigation.do you must add the redirect=true to the foward attribute. If you do this, your navigation action does not need to return null, if you don't add this attribute, then your action must return null. The problem with the latter, is that you can't call this action (viewNavigation.do) in any other way than using the tile tag, because it will jus be a blank page. Here is my action mapping!
<action path="/viewNavigation" scope="session" name="someForm" type="something.web.controller..ViewMultiNavigationAction"> <forward name="success" path="/jsp/myJspPage.jsp" redirect="true" /> </action> On my jsp page it looks like this Jsp start *** Bla bla Bla bla <tile:insert controllerUrl="/viewNavigation.do" page="/jsp/myJspPage.jsp"/> Bla bla Bla bla Jsp end **** My action does not return null because of the redirect="true" <forward name="success" path="/jsp/myJspPage.jsp" redirect="true" /> Hope this helps Cheers Tommy -----Oprindelig meddelelse----- Fra: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sendt: 25. februar 2004 21:31 Til: Tommy Holm - TELMORE Emne: SV: How to create an include which calls an action I'm getting the following error. Can you send me an usage example. I wonder if controller action returns jsp to include why should we give page attribute again? <tiles:insert page="/cap/capGeneralInfoAction.ecims" flush="true"> </tiles:insert> Thanks, Giri. Old message from Tommy ************************************************** No currently none of the proposed solutions worked. I am currently looking into the Tiles:insert tag Attributes are page = the jsp page to insert And most importantly there is an controller attribute which should be an action that perhaps prepares the jsp page. Just testing it now - HOLD ON - it works ... Check the <tiles:insert tag Alternatively I figured another way to do it, it's very ugly though, you can jsp:include an action that just returns null.It does however set up the bean. Then right after this include on your master jsp, you call another jsp include that just includes a regular jsp, on this jsp you can reference The bean that the first include prepared and work as usual. I admitt the latter solution is very ugly, the tiles way seems to be the way to go! Cheers /Tommy --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]