posted 17 years ago
If you're talking about Struts 1, then you can of course have DWR in the mix, but it's a little bit ackward. I have an application that was built that way in production, and what it basically comes down to is you let Struts handle the overall page flow, which tends to not happen nearly as much in any AJAX application anyway, and then DWR kind of handles events for a given page. That works reasonably well, but it's not ideal either because you could do it all with DWR and have simpler code.
If you're talking Struts 2, things *can* be a little different because Actions in S2 are often times POJOs, which DWR can actually instantiate and call methods on. I've never personally done this other than some playing around, but it seems like there would be some limitations involved (i.e., any knowledge of S2 from the Action may not work, HTTP* objects woul dhave to be accounted for, etc), but in theory it should work alright.
-- <br />Frank W. Zammetti<br />Founder and Chief Software Architect<br />Omnytex Technologies<br /><a href="http://www.omnytex.com" target="_blank" rel="nofollow">http://www.omnytex.com</a><br />AIM/Yahoo: fzammetti<br />MSN: [email protected]<br />Author of "Practical Ajax Projects With Java Technology"<br /> (2006, Apress, ISBN 1-59059-695-1)<br />and "JavaScript, DOM Scripting and Ajax Projects"<br /> (2007, Apress, ISBN 1-59059-816-4)<br />Java Web Parts - <a href="http://javawebparts.sourceforge.net" target="_blank" rel="nofollow">http://javawebparts.sourceforge.net</a><br /> Supplying the wheel, so you don't have to reinvent it!