Hi, Tiles framework allows to insert jsp/tiles providing it some attributes. Tiles definition is a way to associate a name (the definition name) to some attributes and path values. Tiles definition names can only be used on the server side. Furthermore, if you access directly from a browser a jsp/tiles using its url, the tile context will not be set, and you wont be able to get attribute values.
It would be simple to let <link> tag map a definition name to its path, but this will not work because actually you can't access directly a jsp/tile by its url. A workaround is to create an action in struts-config.xml. This action is used as url entry point, and forward to the definition name. Associated action class simply do nothing. Action name can now be used in <link> tag. This trick allows to define your site using struts-config.xml and tiles-config.xml, but management is done in two files ;-(. Maybe we need to add a mechanism allowing direct call of a jsp/tile, or at least through the servlet redirection. Cedric Stephen Gissendaner wrote: > > Hello All, > > > > I know that others have mentioned this feature as well. I want to add my > > .02 and throw my support behind the feature. > > > > I would like to be able to have ALL of the pages for my site and ALL of > > the workflows of my site defined in the struts-config.xml and the > > tiles-config.xml files. To me this would represent a significant benefit > > for organizing and maintaining the graphical portion of our applications. > > With all of the pages in the tiles.xml file, we would then have a central > > point of management for all of the site. Tools could be developed to read > > the tiles.xml file and automatically build war files, manage source > > control, check links, todo work, project management, and I don't know what > > else. The point is that with ALL pages defined in the tiles.xml file you > > can organize the html/jsp code much better and greatly reduce the chances > > of something falling through the cracks. > > > > BTW, if we do this, then all .jsp's will ONLY be page parts and templates. > > There would be no complete pages in the project. (I could be wrong on this > > though) > > > > If this becomes a goal, the right now I see 2 barriers. > > 1)allowing for a link to reference a definition in the tiles.xml file. > > 2)Allowing external url's to reference a definition in the tiles.xml file > > with out knowing about tiles. > > > > There are probably many ways to do this. Allowing <html:link > > forward="tiles.defintion.item"> is only one part. We probably need a way > > to have tomcat send all unknown application requests to the tiles.xml > > definitions. > > > > Just throwing this out for discussion. > > > > Sincerely, > > > > > > Stephen W. Gissendaner > > Senior Application Engineer, (contractor) > > EPL > > > >