Dave,
I'm using Roller 3.1 and PageModel is a concrete type in 3.1. I coded my
object half-way by extending the PageModel. But then again, it did not
seem right thing to do as PageModel object needs to be initialized.
What's the way around it? (Seems like I can implement Model ?)

Also the other thing is I need access to HttpServletRequest inside this
new object. How do I get it?

Appreciate your answers.

Thanks,

-----Original Message-----
From: Dave [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 29, 2007 8:02 PM
To: [email protected]
Subject: Re: inserting java code in templates

On Nov 29, 2007 7:36 PM, Prabhu Patil <[EMAIL PROTECTED]> 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

Reply via email to