开发者

Does Sitemesh work with Gaelyk ? Does anybody have a working guide?

开发者 https://www.devze.com 2022-12-20 15:57 出处:网络
Has anyone been able to get sitemesh and gaelyk working together? This seems to be possible as mentioned here http://blogs.bytecode.com.au/glen/2009/12/14/getting-sitemesh-running-on-google-app-engine

Has anyone been able to get sitemesh and gaelyk working together? This seems to be possible as mentioned here http://blogs.bytecode.com.au/glen/2009/12/14/getting-sitemesh-running-on-google-app-engine.html. However I unable to get this working with a gaelyk template. I keep getting开发者_运维技巧 this error

"javax.servlet.ServletException: Creation of template failed: groovy.lang.GroovyRuntimeException: Failed to parse template script (your template may contain an error or be trying to use expressions not currently supported): startup failed: SimpleTemplateScript3.groovy: 2: expecting EOF, found 'prefix' @ line 2, column 77.

phony.com/sitemesh/decorator" prefix="de"

The decorator, main.gtpl, looks like:

<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>

If I rename the above to jsp, it works fine. Either taglibs do not work with gaelyk or I've got the syntax wrong.

Can someone point me in the right direction?

Cheers.


taglib does not work with gaelyk, because gaelyk does not rely on the JSP engine for the .gtpl pages. If you want to use the JSP engine, you migth consider using the GSP pages as well.

Anyway, keep in mind that Gaelyk is just a tiny framework and that it may not be the rigth tool if you want to create a more elaborate project using template engines and such.


Have you tried the SiteMesh tags without defining the taglib? Indeed, as gizmo pointed out, Gaelyk/Groovy templates don't support JSP taglibs per se, but SiteMesh parses content (even pure HTML content!) an replaces the tags with the right content, etc. So it should just work pretty simply.

Also don't forget there's a Google Group dedicated to Gaelyk that you can access from the Gaelyk website.

0

精彩评论

暂无评论...
验证码 换一张
取 消