You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Bragg, Casey" <Ca...@allegiancetelecom.com> on 2001/05/07 23:26:48 UTC
Newbie Q : Getting Started
Hello...
I'm using tdk1.1a13 and I'm having trouble getting started.
I'm trying to follow the introductory example from
http://jakarta.apache.org/turbine/velocity-site.html
Here is the output of my test of
http://localhost:8080/test/servlet/test/template/HelloWorld.vm. Appname =
test.
-------------------------------------------------------------------------
$hello of the emergency broadcast station.
Hello Velocity1 World!
-------------------------------------------------------------------------
Here is my screen file : /tdk/webapps/test/templates/screens/HelloWorld.vm
-------------------------------------------------------------------------
<html>
<head><title>Hello World</title> </head>
<body bgcolor="#ffffff">
<p><font color="red">$hello of the emergency broadcast station.</font></p>
<p>
#set( $foo = "Velocity1" )
Hello $foo World!
</p>
</body>
</html>
-------------------------------------------------------------------------
Here is the class associated with my HelloWorld.vm screen :
/tdk/webapps/test/WEB-INF/classes/turbinetest/HelloWorld.class
-------------------------------------------------------------------------
package turbinetest;
// 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 HelloWorld 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...");
}
}
-------------------------------------------------------------------------
Apparently my HelloWorld.class can't be found. I assume its because
HelloWorld.class is in the turbinetest package. Is there something else I
should place in my HelloWorld.vm file to specify the HelloWorld.class
package name?
Thanks...
...Casey
==============================================
Casey Bragg - Software Engineer
Allegiance Telecom, Inc. Dallas, TX
469-259-2702 - casey.bragg@allegiancetelecom.com
==============================================
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org
Re: Newbie Q : Getting Started
Posted by Jason van Zyl <jv...@apache.org>.
"Bragg, Casey" wrote:
>
> Hello...
>
> I'm using tdk1.1a13 and I'm having trouble getting started.
>
> I'm trying to follow the introductory example from
> http://jakarta.apache.org/turbine/velocity-site.html
>
> Here is the output of my test of
> http://localhost:8080/test/servlet/test/template/HelloWorld.vm. Appname =
> test.
>
Use the sample app in the TDK. Check out README_FIRST.txt
then generate your sample app, and it should get you started.
--
jvz.
Jason van Zyl
jvanzyl@apache.org
http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://jakarta.apache.org/commons
http://tambora.zenplex.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org