I made a posting a couple weeks ago asking for help since I couldn't get
even the HelloWorld.class to function in Velocity. It's sad but true that I
still can't get it to work.
I know that I must be missing something serious here, but have obviously not
been able to pin it down.
??????????
Do I need to re-run "ant init" after adding a class to the screens
directory?
??????????
What am I missing?
??????????
Some background:
1)Compiled class and deposited it at:
C:\web\tdk\webapps\[myApp]\WEB-INF\src\java\com\[myCompany]\[myApp]\modules\screens\HelloWorld.class
------------------------------------
HelloWorld.java
I compiled it with option -verbose and saw no errors or warnings.
I snipped it directly from VelocitySite-Howto
------------------------------------
------------------------------------
// 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...");
}
}
------------------------------------
2) Added to classpath:
C:\web\tdk\webapps\[myApp]\WEB-INF\src\java\com\[myCo]\[myApp]\modules\screens\HelloWorld.class
------------------------------------
3) I also tried to add the following class to the
TurbineResources.properties file as:
module.packages=com.[myCo].[myApp].modules,org.apache.turbine.flux.modules,HelloWorld.class
------------------------------------
Which throws the following error in the turbine.log
------------------------------------
[Wed Sep 05 22:21:52 PDT 2001] -- ERROR -- Cannot find tool class
HelloWorld.class, please check the name of the class.
-Of course I did also check the name of the class. In fact I copied the path
from the windows explorer location bar, and made sure that the
------------------------------------
------------------------------------
HelloWorld.vm
Snipped directly from VelocitySite-Howto
------------------------------------
<p>
<font color="red">
$hello of the emergency broadcast station.
</font>
</p>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]