tags:

views:

797

answers:

2

I have a Grails application with a JSP page (I'm porting a legacy JSP application). For some reason, the page renders completely blank. Looking at the HTTP headers I see it's 200 with a content length of 0.

HTTP/1.1 200 OK
Content-Language: en-US
Content-Type: text/html; charset=iso-8859-1
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: JSESSIONID=1sh9r73vqvukj;Path=/myGrailsApp
Content-Length: 0
Server: Jetty(6.1.12)

The page is a combination of HTML, tags (${property}), JSP includes (<jsp:include>), and short code snippets (<% code %>, yes I know this is a bad idea). There is nothing in the log file or console that indicates an error. Is Grails somehow silently hiding an exception or error?

Edit: The problem is related to the JSP <jsp:include/> include tag. If I remove all JSP includes then Grails will render. Is Grails compatible with JSP? Since JSP functionality is provided by the web application (Jetty, Tomcat) I would think yes.

Edit: This occurs with Grails 1.0.4 and 1.1 beta 2 (1.1 claims to have added JSP support)

A: 

Yes, Grails is compatible with JSP.

Completely blank? So if you "show source" you get nothing?

If you're an IntelliJ user you can install the Grails plug-in, set a breakpoint and step through the code to see what's happening.

The other things I'd check are version and JSTL standards. Those change depending on the version of servlet/JSP engine you're using.

duffymo
Yup, it's completely blank. Show source is blank (as the Content-Length is 0).
Steve Kuo
Oh, my. I've got nothing then. Which servlet/JSP engine are you using, Jetty or Tomcat? Which version?
duffymo
Jetty, whichever version is included in Grails
Steve Kuo
A: 

Sounds like you're not deploying your tag libraries properly. We need to know the app server you are using to be able to help you further.

Edit: Another thought - perhaps the include tag is working, but there is a compile error in the content being included. Have you tried just returning the included content?

Kevin Williams