Thanks Antonio. What I'm trying to do is migrate the S1/T1 part of a large S1/S2 app to use Tiles-2. That way, I will be able to include parts of pages generated from S1 actions inside pages generated by S2 actions.

So far, it doesn't work.  These are the steps I've taken:
1.  remove 'struts-tiles-1.3.8.jar'
2. in struts-config.xml, remove the tiles-processor and tiles-plugin sections 3. in web-xml add the specified servlet reference. If the config parameter is incorrect on the web site, what should it be? Specify WEB-INF/tiles.xml as the tiles-definitions file. Remove the previous tiles-defs.xml file
4.  added the tiles definition to my T2 tiles.xml file.
5. fixed the tiles tags in the jsp pages to use the new element names and attribute names.

Am I missing anything? Note that the TilesListener is already specified in the web.xml file because it was needed for Struts-2/Tiles-2. Could I get by without specifying the Tiles Servlet, and just use a config param to specify the tiles.xml file as the tiles definition source?

It seems like T2 is intercepting and rendering responses ending in "*.tiles". Is that correct, and is it configurable? My habit has been to use "*.screen" as my Tiles pages mappings.

Finally, what would be needed to make S2 work with T2, but not using the Struts-Tiles plugin? It seems to me that one of the weaknesses of the S2 architecture is using a single rendering scheme by specifying a 'type' for the result mappings. This precludes compound rendering types, like jsf-tiles inside S2. That is, I can't have a page with some portions rendered as JSF, some non-JSF, and use Tiles to compose them.

As to how the documentation could be clearer about use of servlet OR filter OR listener - I misunderstood it, but would have understood a sentence like: "To configure your application to use Tiles-2, you need to modify the web-xml file to specify using either (1) the TilesServlet, or (2) the TilesFilter, or (3) the TilesListener. The required elements are shown below: ....."

Also the migration guide does not address some of the steps I specified above, like removing the struts-tiles-xxx.jar file, or removing the tiles-processor and tiles-plugin elements from the struts-config.xml file. I guess those steps are required, but the documentation never told me that, only my previous experience. Lots of people haven't any previous experience to guide them.

To me, Tiles was always the single best feature of Struts, and I am really glad to see it evolving on its own.

Thanks,
- Ray Clough



Antonio Petrelli wrote:
2007/6/14, Ray Clough <[EMAIL PROTECTED]>:

It seems to me that the config info at
http://tiles.apache.org/tutorial/configuration.html is incomplete and in
error.  1)  There is no filter-mapping or servlet-mapping specified.



It is not necessary. The TilesServlet is not a  request/response servlet,
but only a startup servlet. What I mean is that it is needed to initialize
Tiles, not to serve requests.

 2) the tiles definition files are specified both for the servlet and the
filter.  There is no statement about using one or the other.  The only
other instruction is the alternative of using a context parameter.



Maybe it isn't clear that using a TilesServlet, TilesListener or TilesFilter are mutually exclusive: use it and discard the others... How do you suggest
to change the sentences?


How is the mapping to be specified.  My guess is that if the filter and
servlet are mapped to "*.tiles", for example, all forwards to
"xxx.tiles" will be rendered by Tiles.  Is that correct?  Do both the
filter and servlet need to be mapped.  If either is not mapped, is it
actually used?  Must they be mapped to the same value?



I think that you are referring to this:
http://tiles.apache.org/tutorial/advanced/utils.html

Thanks
Antonio

P.S. The Tiles configuration parameter that is used to specify Tiles
definition files in:
http://tiles.apache.org/tutorial/configuration.html
is not correct, I will fix it ASAP.

Reply via email to