Hi Jozsa, maybe you have to set up correctly the module's classpath in TurbineResources.properties file:
...... # ------------------------------------------------------------------- # # M O D U L E P A C K A G E S # # ------------------------------------------------------------------- # This is the "classpath" for Turbine. In order to locate your own # modules, you should add them to this path. For example, if you have # com.company.actions, com.company.screens, com.company.navigations, # then this setting would be "com.company,org.apache.turbine.modules". # This path is searched in order. For example, Turbine comes with a # screen module named "Login". If you wanted to have your own screen # module named "Login", then you would specify the path to your # modules before the others. # # Default: org.apache.turbine.modules # ------------------------------------------------------------------- module.packages=org.dyn.joint.modules,org.apache.turbine.modules ...... In this way Turbine will be able to find your TestConn module. Good luck! Jacopo ----- Original Message ----- From: Jozsa Kristof <[EMAIL PROTECTED]> To: Turbine User List <[EMAIL PROTECTED]> Sent: Monday, October 08, 2001 2:34 PM Subject: Re: navigation > <newbie/> > > I'm trying to test out the connection between a navigation .vm file, and my > corresponding Java class. It's working with screens, but I'd need to use > dynamic data with navigations as well. I've followed the basic instructions > described in that mail: > > http://www.mail-archive.com/turbine-user%40jakarta.apache.org/msg03687.html > > ..but so far, it does not seem working. > > > My files are placed like this: > > APP/templates/app/navigations/TestConn.vm > APP/WEB-INF/src/java/org/MYPACK/APP/modules/navigations/TestConn.java > > so after compilation, the class got placed at: > APP/WEB-INF/classes/org/MYPACK/APP/modules/navigations/TestConn.class > > TestConn.java contains: > --- > package org.dyn.joint.modules.navigations; > import org.apache.turbine.modules.screens.VelocityScreen; > import org.apache.turbine.util.RunData; > import org.apache.velocity.context.Context; > public class TestConn extends VelocityScreen > { > public void doBuildTemplate( RunData data, Context context ) > { > context.put("testconn", "connection alive"); > } > } > --- > > and the .vm file tries to print out $testconn, but velocity.log says: > '$testconn is not a valid reference.', and '$testconn' is printed out as a > string ofc, according my Turbine setup. > > I cant find any place to explicitly connect the vm file with the java class, > but as I've understood, the class loader of turbine should find it himself > (herself? :) automatically. > > What's wrong with the above? > > Regards, > Kristof > -- > .Digital.Yearning.for.Networked.Assassination.and.Xenocide > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
