-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all,
In my JSP page (list.jsp), I'd like to include another page (item.jsp). The latter should include itself, if needed. The problem, when using c:import, is that the JSP compiler will throw an StackOverflowException, so that's why I'm trying to use the layout-render tag. Because I'm using layouts as well, the layout-render is inside a layout-component. list.jsp iterates over a list of items, and item.jsp should display them, so I'm using the c:forEach tag. When I try to run this, I get a NullPointerException in LayoutDefinitionTag.doStartTag (LayoutDefinitionTag.java:72), where stack is null. So I thought I'd give the example in the Stripes wiki [1] a chance. No success, neither :(. Now I'm wondering whether I'm using these tags the right way. Below, you'll find some snippets of code. Can anyone provide me with a clue? Extract from list.jsp: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld"%> <stripes:layout-render name="/WEB-INF/jsp/layout/default.jsp"> <stripes:layout-component name="contents"> <c:forEach items="${actionBean.categories}" var="category"> <stripes:layout-render name="item.jsp" category="${category}" /> </c:forEach> </stripes:layout-component> </stripes:layout-render> Extract from item.jsp: <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> <%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld"%> <stripes:layout-definition> <tr id="row${category.categoryId}"> <!-- stuff --> </tr> </stripes:layout-definition> Kind regards, Maarten Mulders [1]: http://www.stripesframework.org/display/stripes/Layout+Reuse -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFJV5PEfeLUC0LG+t0RAvQjAJ9aVQ0KR3VsEvVdRjnkVd9wdVhTpACfc2bb 8bTL/i7juno79Qgcsvd9cnc= =jh/s -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
