Monday, July 20, 2009

Problem with Tiles + Grails 1.1 (beta2)

In my last post i've mentioned that i was able to successfully integrate Tiles with Grails. It seems i spoke too soon. I found out that the current release of Grails 1.1 beta version still have problems rendering with custom JSP tags. Specifically, i found out that you Grails can't process nested custom JSP tags correctly.

To illustrate, I've created a new grails app, and tried to create a very simple page using the jstl core tag libs, with the ff. content:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>test</title>
</head>
<body>
<c:choose>
<c:when test="${1==1}">
hello
</c:when>
</c:choose>
</body>
</html>

A grails runtime exception is encountered:
javax.servlet.jsp.JspTagException: Illegal use of <when>-style tag without <choose> as its direct parent

There may be more problems to be encountered later, so i think we're opting not to integrate tiles with grails, and use the old-fashioned-but-reliable struts instead. Sadly, the estimates we gave to the client are based on Grails, not Struts! =P

No comments:

Post a Comment