I'm actually done this (albeit using Spring MVC but similar issues apply). In 
general it's pretty easy - the new activation context makes it much easier to 
point to tapestry pages from a non-tapestry base (or indeed a bookmark). For 
example you can now call http://www.domain.com/app/showProduct/1 which will 
call the show product page and pass in a parameter of 1. 

One thing you can't easily do is link from non-tapestry code to tapestry event 
handlers on a page (particularly if you have nested components). For example 
you may have a page called ListUsers with an addUser() method on it. It's a bit 
tricky to link to the event handler as you could in an action oriented 
framework - you can't simply call ListUsers?addUser as you could in with a 
struts Dispatch Action. However there are ways to work around this and in 
practice it's not been a problem for me.

One thing to watch is the non-tapestry urls you may use in your pages(e.g. a 
reference to the servlet which generates the images). You needto ensure that 
these urls are absolute and include the context root.Otherwise you'll get type 
coercion errors. This is pretty simple toachieve by Injecting the Tapestry 
request into your page or component.

As for telling tapestry to ignore the servlets and actions - this shouldn't be 
a problem because the tapestry filter will simply ignore requests that it 
doesn't understand - I have a servlet which generates the dynamic images and 
tapestry happily ignores and requests made to it.

Anyway, like I said I've done this recently and it's been pretty painless - I'd 
be happy to share my experiences with you

Toby

----- Original Message ----
From: Lance Java <[EMAIL PROTECTED]>
To: Tapestry users <[email protected]>
Sent: Tuesday, 13 May, 2008 12:47:32 PM
Subject: Can struts 1 and tapestry 5 play together nicely?

We are about to add a new section to an existing struts1 application and I
was hoping that I could implement the new section using tapestry 5 with a
view to migrating some of the existing pages to tapestry 5 in the future.
The existing application has a couple of servlets for generating images
(graphs etc) and references jsp's, stylesheets and images etc from a war.

So... a couple of questions:
1. Is this going to be possible?
2. Will I need to tell tapestry to ignore the existing servlets? (*.do,
etc.)
3. Any issues with linking from struts pages to tapestry pages?
4. Any other issues you can think of with doing this?

Thanks,
Lance.



Reply via email to