| Title | Struts |
| Date | 19-May-2005 13:09:57 EEST |
| JSPWiki version | |
| Submitter | 81.80.239.163 |
| Idea Category | GenericIdea |
| Reference | |
| Status | NewIdea |
Why not refactor JSPWiki to use the well known Jakarta Struts Framework ? It would be easier to apply MVC pattern which forbid java code in JSP pages. Debug would also be easier since you could use eclipse IDE + tomcat plugin to debugger step by step ...
If I were to refactor JSPWiki to use anything, it would probably be Velocity :-). Almost all debugging problems are in the Java code anyway; JSP pages rarely have issues. The less code there is on the JSP pages, the better.
well Velocity is more a template engine than a webflow, you could use Struts as a controller and still use Velocity as Page template. It is true than moving to Struts would only move code from the "fake" webroot servlets like Wiki.jsp, Preview.jsp ... in java controller classes, the other JSP under /templates are real ones. And I take your point that debug is deeper than those front JSP pages. You could take advantage of the Struts/Tiles templating to compose your jsp with fragments of JSP ... just like the includes but from outside your JSP in an xml config file.
I also think Debugging would be way easier and the architecture would be much cleaner if you get all Java code out of the JSPs. This could be done by using Struts, but also using the existing WikiServlet. It looks quite artificial to have a RequestDispatcher dispatch to a JSP which again does some logic. I guess is only to give credit to the name JSPWiki ;-)
--Jürgen Weber, 09-Mar-2006
No, actually using JSP for templating is quite normal. :-)
--Janne Jalkanen, 09-Mar-2006