roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prabhu Patil" <ppa...@digitas.com>
Subject RE: inserting java code in templates
Date Fri, 30 Nov 2007 02:06:26 GMT
Thanks Dave. I'll be all immersed in that post for next 15-20 minutes!

-----Original Message-----
From: Dave [mailto:snoopdave@gmail.com] 
Sent: Thursday, November 29, 2007 8:02 PM
To: user@roller.apache.org
Subject: Re: inserting java code in templates

On Nov 29, 2007 7:36 PM, Prabhu Patil <ppatil@digitas.com> wrote:
> How do I insert Java code in the Roller template and be sure that it
> gets processed. I need to add following 2 lines. When I tried, Roller
> seems to neglect the Java lines and paints the page.
>
> <%@ include file="/common/config.inc.jsp" %>
>
> <app:checkAV redirect="/av.do" />
>
> Basically, I need to call custom tag functionality from the Roller
> template. Is it possible?. Please respond ASAP as this is urgent.
> Appreciate it.

You cannot include Java or JSP code in a Roller template, Velocity is
the template language.

You can call out to Java objects, for example $model.weblog is
actually a call to a Java getWeblog() method. So, it's possible that
you could add some new model objects to Roller to do what you want and
then call them from your templates.

Here are some instructions I posted earlier that explain how to make
new objects available in templates.
  http://markmail.org/message/jdrk5jw4tg2ynkdp

- Dave

Mime
View raw message