Hi All! I was wondering if it is allright to add the tiles definiton name being processed in Globals and set it as a request attribute.
Then, in the TilesRequestProcessor.processForwardConfig(...) method, we set the value of the tiles request being processed. Following is some code to do it. POA === Globals ======= Key Name: TILES_DEF_NAME_KEY Key Value: org.apache.struts.tiles.TILES_DEFINITION_NAME TilesRequestProcessor ===================== MethodName: processForwardConfig MODS: Do following: =========================== if( processTilesDefinition ) { ... request.setAttribute( Globals.TILES_DEF_NAME_KEY, forward.getPath() ); ... } ... =========================== If some committer agrees with this solution, I can try submitting a patch. TIA, Kunal -----Original Message----- From: Liu, Anne I [mailto:[EMAIL PROTECTED] Sent: Wednesday, 28 April 2004 00:46 To: 'Struts Users Mailing List' Subject: RE: REPOST: Determining tiles definition name from JSP The only way I found to do it was to have a action mapped for each tiles definition. For example.... <action path="/exampleHome" forward="pages.examples.home" /> Then when I go to the URL http://localhost:80/CTX/exampleHome.do, for the code below, I get "pages.examples.home" String tilesName = null; ActionMapping mapping = (ActionMapping)request.getAttribute(Globals.MAPPING_KEY); if(mapping != null) {//tiles tilesName = mapping.getForward(); } I hope this helps! > -----Original Message----- > From: Kunal H. Parikh [SMTP:[EMAIL PROTECTED] > Sent: Monday, April 26, 2004 2:00 AM > To: 'Struts Users Mailing List' > Subject: REPOST: Determining tiles definition name from JSP > > Hi All! > > Is it possible to determine the name of the tiles definition being > processed > from within a JSP page? > > I am attempting to have an XML menu with IDs exactly the same as the name > of > the tile definition. > > Then I would do some XSLT, and id matching and fetch the appropriate XML > fragment. > > > TIA, > > Kunal > > > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]