You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Simon REZE <sr...@progi-ouest.fr> on 2003/02/21 15:24:06 UTC

Newbie problem : $hello is not a valid reference.

Hi,


I try to perform this example of Velocity/Turbine under Jetspeed1.4b3.

// Velocity Stuff
import org.apache.velocity.context.Context;

// Turbine Stuff
import org.apache.turbine.util.RunData;
import org.apache.turbine.modules.screens.VelocityScreen;

public class testHello extends VelocityScreen
{
    public void doBuildTemplate( RunData data, Context context )
        throws Exception
    {
          // the context object has already been setup for you!
        context.put ("hello", "this is a test...");
    }
}

I've a testHello.vm template which reference $hello variable :
<p>
    <font color="red">
        $hello of the emergency broadcast station.
    </font>
</p>

My testHello class seems never be executed.
I load
http://localhost:8080/jetspeed1-4/portal/media-type/html/user/anon/page/default.psml/template/testHello
I've the following log :

2003-02-21 14:50:16,033 -
org.apache.velocity.runtime.exception.ReferenceException: reference :
template = screens/html/testHello.vm [line 3,column 9] : $hello is not a
valid reference.

Any idea?
Could it be due to Jetspeed implementation or did I write somthg wrong?

Thx.
Simon.


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org