You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tiles.apache.org by David Chisholm <dc...@onenetwork.com> on 2007/05/01 19:25:38 UTC

Struts Tiles and Tiles 2 compatibility

 
Can Struts Tiles and Tiles 2 co-exist in the same web app?  I have a large
project using Struts Tiles and would like to run both as I migrate it to
Tiles 2.
 
PS - I would have posted this to the user list, but it's not accepting
subscriptions.
 
-- David
 

Re: Struts Tiles and Tiles 2 compatibility

Posted by Antonio Petrelli <an...@gmail.com>.
2007/5/9, David Chisholm <dc...@onenetwork.com>:
>
> the Tiles 2.0.3 ChainedTilesContextFactory#init() method is not
> called by Struts 2.0.6


You're right, the TilesContextFactory#init() method has been introduced in a
later version than that supported by Struts 2.0.6.

Antonio

Re: Struts Tiles and Tiles 2 compatibility

Posted by "David H. DeWolf" <dd...@apache.org>.
I don't believe it is. . .but it's on my todo list.

David

David Chisholm wrote:
> To update this thread, the problem was that the Tiles shipped with Struts
> 2.0.6 uses the older Tiles DTD, and I was configuring my definitions with
> the new DTD.  I upgraded to Tiles 2.0.3, and that fixed that problem.
> However, the Tiles 2.0.3 ChainedTilesContextFactory#init() method is not
> called by Struts 2.0.6 which in turn causes a null pointer exception in
> ChainedTilesContextFactory#createApplicationObject() when accessing the
> factories member.
>  
> In the end, I reverted to the previous Tiles DTD format and the Tiles
> version shipped with Struts 2.0.6.
>  
> Does anyone know if the integration of the latest Struts2-Tiles-Plugin is
> working with Tiles 2.0.3?
>  
> -- David
>  
> 
> -----Original Message-----
> From: Greg Reddin [mailto:gredbug@gmail.com] 
> Sent: Tuesday, May 01, 2007 2:43 PM
> To: dev@tiles.apache.org; dchisholm@onenetwork.com
> Subject: Re: Struts Tiles and Tiles 2 compatibility
> 
> 
> 
> 
> On 5/1/07, David Chisholm <dc...@onenetwork.com> wrote: 
> 
> 
> I've following the definition parsing into the Digester, and it's not
> assigning the attributes.  I think I have an old Digester version.  Is there
> a minimum version required for Tiles 2?  I didn't see it mentioned anywhere.
> 
> 
> 
> All the POMs point to Digester version 1.8, but I don't know where we're
> using any 1.8-specific features. It should be able to work with an older
> version (depending on just how old you mean). 
> 
> 
> 
> BTW, another aspect of configuration is that I've co-deployed Struts 1 and 
> Struts 2, and I'm using Struts 2.0.6 with the version of Tiles 2 that is
> distributed with it.
> 
> 
> This could be the root of your problem.  Have you tried the latest (2.0.3)
> version of Tiles? Can you post a part of your definitions so we can check
> them against the API? 
> 
> The JSP and XML APIs have experienced quite a bit of change (which should be
> slowing down significantly now). It very well could be that you are using a
> snapshot of Tiles that was produced in the middle of all that change. 
> 
> Greg
> 
> 
> 
> 

RE: Struts Tiles and Tiles 2 compatibility

Posted by David Chisholm <dc...@onenetwork.com>.
To update this thread, the problem was that the Tiles shipped with Struts
2.0.6 uses the older Tiles DTD, and I was configuring my definitions with
the new DTD.  I upgraded to Tiles 2.0.3, and that fixed that problem.
However, the Tiles 2.0.3 ChainedTilesContextFactory#init() method is not
called by Struts 2.0.6 which in turn causes a null pointer exception in
ChainedTilesContextFactory#createApplicationObject() when accessing the
factories member.
 
In the end, I reverted to the previous Tiles DTD format and the Tiles
version shipped with Struts 2.0.6.
 
Does anyone know if the integration of the latest Struts2-Tiles-Plugin is
working with Tiles 2.0.3?
 
-- David
 

-----Original Message-----
From: Greg Reddin [mailto:gredbug@gmail.com] 
Sent: Tuesday, May 01, 2007 2:43 PM
To: dev@tiles.apache.org; dchisholm@onenetwork.com
Subject: Re: Struts Tiles and Tiles 2 compatibility




On 5/1/07, David Chisholm <dc...@onenetwork.com> wrote: 


I've following the definition parsing into the Digester, and it's not
assigning the attributes.  I think I have an old Digester version.  Is there
a minimum version required for Tiles 2?  I didn't see it mentioned anywhere.



All the POMs point to Digester version 1.8, but I don't know where we're
using any 1.8-specific features. It should be able to work with an older
version (depending on just how old you mean). 



BTW, another aspect of configuration is that I've co-deployed Struts 1 and 
Struts 2, and I'm using Struts 2.0.6 with the version of Tiles 2 that is
distributed with it.


This could be the root of your problem.  Have you tried the latest (2.0.3)
version of Tiles? Can you post a part of your definitions so we can check
them against the API? 

The JSP and XML APIs have experienced quite a bit of change (which should be
slowing down significantly now). It very well could be that you are using a
snapshot of Tiles that was produced in the middle of all that change. 

Greg




Re: Struts Tiles and Tiles 2 compatibility

Posted by Greg Reddin <gr...@gmail.com>.
On 5/1/07, David Chisholm <dc...@onenetwork.com> wrote:
>
>
> I've following the definition parsing into the Digester, and it's not
> assigning the attributes.  I think I have an old Digester version.  Is
> there
> a minimum version required for Tiles 2?  I didn't see it mentioned
> anywhere.


All the POMs point to Digester version 1.8, but I don't know where we're
using any 1.8-specific features. It should be able to work with an older
version (depending on just how old you mean).

BTW, another aspect of configuration is that I've co-deployed Struts 1 and
> Struts 2, and I'm using Struts 2.0.6 with the version of Tiles 2 that is
> distributed with it.


This could be the root of your problem.  Have you tried the latest (2.0.3)
version of Tiles? Can you post a part of your definitions so we can check
them against the API?

The JSP and XML APIs have experienced quite a bit of change (which should be
slowing down significantly now). It very well could be that you are using a
snapshot of Tiles that was produced in the middle of all that change.

Greg

RE: Struts Tiles and Tiles 2 compatibility

Posted by David Chisholm <dc...@onenetwork.com>.
 
Now that I know they *might* work together, here's the specific issue I'm
having.  I did deploy them together using two sets of everything (XML
configs, JSPs, etc.).  It's working to the point that Tiles 2 finds my Tiles
2 definition and is attempng to render it, however, it's not finding the
definition's attributes in order to insert them.
 
I've following the definition parsing into the Digester, and it's not
assigning the attributes.  I think I have an old Digester version.  Is there
a minimum version required for Tiles 2?  I didn't see it mentioned anywhere.
 
BTW, another aspect of configuration is that I've co-deployed Struts 1 and
Struts 2, and I'm using Struts 2.0.6 with the version of Tiles 2 that is
distributed with it.
 
Thanks for the help and the correct information on the users list.
 
-- David
 

-----Original Message-----
From: Greg Reddin [mailto:gredbug@gmail.com] 
Sent: Tuesday, May 01, 2007 12:51 PM
To: dev@tiles.apache.org; dchisholm@onenetwork.com
Subject: Re: Struts Tiles and Tiles 2 compatibility




On 5/1/07, David Chisholm <dc...@onenetwork.com> wrote: 


Can Struts Tiles and Tiles 2 co-exist in the same web app?  I have a large
project using Struts Tiles and would like to run both as I migrate it to
Tiles 2.


Yes and no. The API for Tiles 2 is drastically different from Struts Tiles
so the two frameworks require separate XML files, separate configuration
elements, and separate JSP pages. I don't think it will work to "merge" the
two ( i.e. you probably can't just include Tiles 2 elements from Struts
Tiles pages, etc.). The JAR files should be compatible but I'm not real sure
how they will behave if co-deployed.

We do have a task on the list to build a Struts-Tiles compatibility layer
that would allow you to reuse Struts-Tiles pages and XML files with Tiles 2,
but I have no idea when such a library will be available. (If you have ideas
we'd gladly accept patches :-) 



PS - I would have posted this to the user list, but it's not accepting
subscriptions.


Wow, I just noticed that the website links to "tiles-user" instead of
"tiles-users".  To subscribe to "users" please send a mail to
users-subscribe@tiles.apache.org. I'll try to get the site fixed.

Thanks,
Greg




Re: Struts Tiles and Tiles 2 compatibility

Posted by Greg Reddin <gr...@gmail.com>.
On 5/1/07, David Chisholm <dc...@onenetwork.com> wrote:
>
>
> Can Struts Tiles and Tiles 2 co-exist in the same web app?  I have a large
> project using Struts Tiles and would like to run both as I migrate it to
> Tiles 2.


Yes and no. The API for Tiles 2 is drastically different from Struts Tiles
so the two frameworks require separate XML files, separate configuration
elements, and separate JSP pages. I don't think it will work to "merge" the
two (i.e. you probably can't just include Tiles 2 elements from Struts Tiles
pages, etc.). The JAR files should be compatible but I'm not real sure how
they will behave if co-deployed.

We do have a task on the list to build a Struts-Tiles compatibility layer
that would allow you to reuse Struts-Tiles pages and XML files with Tiles 2,
but I have no idea when such a library will be available. (If you have ideas
we'd gladly accept patches :-)

PS - I would have posted this to the user list, but it's not accepting
> subscriptions.


Wow, I just noticed that the website links to "tiles-user" instead of
"tiles-users".  To subscribe to "users" please send a mail to
users-subscribe@tiles.apache.org. I'll try to get the site fixed.

Thanks,
Greg