The TilesRequestProcessor appears to do an exact text match, to determine whether its a tile or not, so with a querystring it won't work. To get around it you could overrride that method in a subclass.
On 7/27/06, prasad pondugula <[EMAIL PROTECTED]> wrote:
Hello all, In struts/tiles environment, how to pass dynamic key/value parameters from an action class? I know way of setting dynamic key/values from action class but it is not working with tiles. Let me be more clear. 1). TestAction.java: in execute() method, based on some logic, we might want to pass more than one key/value parameters (ie; it could be 1 or 5 pairs). Ex: key1=val1&key2=val2&key3=val3&key4=val4&key5=val5 etc. key/values could completely dynamic and different for different scenarios. This is what we did in the action class after figuring out how many key/values we have, String requestStr = "?action=prepareorder&ordNum=123&ordDest=Pittsburgh"; ActionForward forward = new ActionForward(); forward.setPath(mapping.findForward("fwdPrepareOrder").getPath() + requestStr); return forward; 2). struts-config.xml <action path="/prepareorder" type="com.genco.rps.action.operation.PrepareOrderAction" scope="request" name="buyerSearchForm" validate="false"> <forward name="fwdPrepareOrder" path="tilesDefPrepareOrder" redirect="false" /> </action> 3). tiles-defs.xml <definition name="tilesDefPrepareOrder" path="/common/layout.jsp"> <put name="title" value="some title" /> <put name="header" value="/common/header.jsp" /> <put name="body" value="/operations/prepareorder.jsp"/> <put name="footer" value="/common/footer.jsp" /> </definition> When I execute the application, instead of going to tiles-defs.xml, it tries to look for "tilesDefPrepareOrder?action=prepareorder&ordNum=123&ordDest=Pittsburgh" and gives the following error: 500 Internal Server Error Cannot get request dispatcher for path tilesDefPrepareOrder?action=prepareorder&ordNum=123&ordDest=Pittsburgh Please give us your suggestions. Thanks for looking into the issue. Regards, Prasad Pondugula CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure of distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]