我为我的事件Instance创建了这个grails视图(create.gsp)但是在调用/ event / create之后我收到以下错误消息(stacktrace):
Line | Method
->> 19 | runTask in /grails-app/views/event/create.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Caused by GrailsTagException: Unclosed GSP expression
->> 33 | doCall in /grails-app/views/event/create.gsp
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
这是我的create.gsp:
<%@ page import="testProject.Event" %>
<!doctype html>
<html>
<head>
<meta name="layout" content="backend">
<g:set var="entityName" value="${message(code: 'event.label', default: 'Event')}" />
<title><g:message code="default.create.label" args="[entityName]" /></title>
</head>
<body>
<div class="speedbar">
<div class="speedbar-nav"> <a href="#">Color life Admin Panel</a> › <a href="#">Form Styling</a></div>
<div class="search">
<form>
<input type="text">
</form>
</div>
</div>
<div class="grid-1" id="create-event">
<!-- Line 19--> <g:if test="${flash.message}">
<div class="alert blue hideit message" role="status">${flash.message}</div>
</g:if>
<g:hasErrors bean="${eventInstance}">
<g:eachError bean="${eventInstance}" var="error">
<div class="alert red hideit"><g:message error="${error}"/></div>
</g:eachError>
</g:hasErrors>
<div class="title-grid"><g:message code="default.create.label" args="[entityName]" /><span></span></div>
<div class="content-gird" style="display: block; ">
<div class="form">
<g:form action="save" >
<g:render template="form"/>
<g:submitButton name="create" class="button-a gray" value="${message(code: 'default.button.create.label', default: 'Create')}" />
<!-- Line 33--> </g:form>
<div class="clear"> </div>
</div>
</div>
</div>
</body>
</html>
我的错误在哪里?你看到了吗?
答案 0 :(得分:0)
Grails 2.0.3中的GSP错误报告似乎存在错误。此提交可能已修复它:https://github.com/grails/grails-core/commit/fbb46af1aac77dd215eae7a1625f830fc2b1cb29
请使用Grails 2.1.0 RC1版本重新测试GSP错误报告,如果问题仍然存在,请使用测试用例报告Grails Jira中的问题。这将有助于改进GSP错误报告。谢谢!