Hi Gustavo,

The code that you put in the email was in the package

package com.yourcompany.app.modules.screens;  

The class/screen loader uses the module.packages list to find you screen classes. 
And you need to tell it where your screen classes are, ie. you need to
put com.yourcompany.app.modules in the module.packages list.
(If you change your package names for your post you can probably ignore this.)

To see if they are running , just put log messges in your classes to see if they are 
being run.

If you are using TDK 2.3

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;


declare the following in your class:

  private static Log log = LogFactory.getLog(HelloWorld.class)

then call 
        log.debug(">>>>>> running HelloWorld.doBuildTemplate"); 

and you should see something on the console or in the log file. If log level is set to 
DEBUG.
Alternatively you could do a System.println  or something.

cheers
Peter



> -----Original Message-----
> From: Gustavo Pinheiro [mailto:[EMAIL PROTECTED] 
> Sent: 18 December 2003 1:09 
> To: 'Turbine Users List'
> Cc: EXT-McTaggart, Peter
> Subject: RES: newbie
> 
> 
> Hi Peter,
> 
> I don�t know if it is loading and running my class. How could 
> I verify that?
> 
> Anyway, thanks for the answer, but I believe that the confs 
> in TurbineResources.prop are not the problem because flux 
> works just fine. And my TurbineResources.prop has the following line:
> 
>       
> module.packages=com.estatcamp.site.modules,org.apache.turbine.
> flux.modules
> 
> Which, I believe, is the way its meant to be.
> 
> Thanks anyway.
> 
> -----Mensagem original-----
> De: EXT-McTaggart, Peter [mailto:[EMAIL PROTECTED] 
> Enviada em: quarta-feira, 17 de dezembro de 2003 21:29
> Para: Turbine Users List
> Assunto: RE: newbie
> 
> 
> Gustavo,
> 
> Is it actually loading and running your Java class? 
> 
> You may have to change your TR.props files to point to the 
> package location
> 
> check the modules.packages property in that file
> (WEB-INF/conf/TurbineResources.properties)
> to see if your java packages are listed, ie. 
> com.yourcompany.app.modules should be in the list.
> 
> If you are using the TDK then your Java class should be in 
> the screens directory and package, which by the code below it 
> should be.
> 
> HTH,
> 
> cheers
> Peter
> 
> 
> > -----Original Message-----
> > From: Gustavo Pinheiro [mailto:[EMAIL PROTECTED]
> > Sent: 18 December 2003 12:05
> > To: [EMAIL PROTECTED]
> > Cc: 'Jeff Painter'
> > Subject: RES: newbie
> > 
> > 
> > Hi Jeff,
> > 
> > I�m using the 2.3 version now, but the same thing 
> happens!!! That is a 
> > strong indication that << I >> am doing something wrong, 
> but I can�t 
> > figure it out myself. Everything seems fine except that I 
> can�t access 
> > anything that�s put in a context from a java class. Take a 
> look at the 
> > code:
> > 
> >     package com.yourcompany.app.modules.screens;
> > 
> >     // 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...");
> >         }
> >     }
> > 
> > It is a plain Copy&Paste from Turbine�s HowTo. I figured 
> all I had to 
> > do was put things in the context and they would be 
> available for use 
> > in the templates. Here�s the template:
> > 
> >     $page.setTitle("Hello world!!!!!!")
> > 
> >     #set( $a = "Velocity" )
> > 
> >     <h2> $hello $a testando 12 3   4       5 </h2>
> > 
> > 
> > And the output is " $hello Velocity testando 1 .... ". From that I 
> > assume Velocity is working, to some extent at least. I don�t know 
> > about Turbine. By the way, I�m sure the .class file is in the right 
> > place, along with the rest (Index.class and 
> SecureScreen.class). All 
> > "build.properties" files and the 
> "TurbineResources.properties" seem to 
> > be in order. I also setted the context as reloadable in Tomcat.
> > 
> > What could it be?
> > 
> > 
> > 
> > 
> > -----Mensagem original-----
> > De: Jeff Painter [mailto:[EMAIL PROTECTED]
> > Enviada em: quarta-feira, 17 de dezembro de 2003 15:47
> > Para: Gustavo Pinheiro
> > Assunto: Re: newbie
> > 
> > 
> > 
> > 
> > If you are just starting out, you should probably use the tdk-2.3 I 
> > just put together a week ago. It includes in the sample app a
> > couple of intake 
> > examples and should be a better starting point than the old tdk.
> > 
> >  http://kiasoft.com/~painter/tdk-2.3_20031210.tar.gz
> > 
> > 
> > On Wed, 17 Dec 2003, Gustavo Pinheiro wrote:
> > 
> > > Hello,
> > > 
> > > I'm trying to use Turbine+Velocity and I got stuck at the very
> > > begining. I successfully installed TDK 2.2 and the sample 
> app. But 
> > > when trying to deploy the HelloWorld app contained in the 
> Velocity 
> > > Site HowTo
> > >
> > (http://jakarta.apache.org/turbine/turbine-2.3/howto/velocity-
> > site-howto.htm
> > > l) I ran into trouble. It just doen't work as it should.
> > When I load
> > > the
> > app
> > > from a browser, it shows "$hello..." instead of the var
> > value ("this
> > > is a test..."). The java file compiles just fine and the Velocity 
> > > seems to be working since both header and footer are
> > included in the
> > > output, but it does�t access the variable in the context.
> > > 
> > > What could I be doing wrong?
> > > 
> > > Thanks in advance.
> > > 
> > 
> > 
> > --
> > Regards,
> > 
> > Jeffery Painter
> > 
> > - --
> > [EMAIL PROTECTED]                     http://kiasoft.com
> > PGP FP: 9CE8 83A2 33FA 32B1 0AB1  4E62 E4CB E4DA 5913 EFBC
> > 
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.2.1 (GNU/Linux)
> >  
> > iD8DBQE/qEQE5Mvk2lkT77wRAnMJAJ9vJ6qOkg/mvqqIpz7troCEQJ8bFACglu/U
> > YNXabx7DZOV2Hd9LwSTmGpY=
> > =dWiu
> > -----END PGP SIGNATURE-----
> > 
> > 
> > ---
> > Incoming mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.552 / Virus Database: 344 - Release Date: 15/12/2003
> >  
> > 
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.552 / Virus Database: 344 - Release Date: 15/12/2003
> >  
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > 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]
> 
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.552 / Virus Database: 344 - Release Date: 15/12/2003
>  
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.552 / Virus Database: 344 - Release Date: 15/12/2003
>  
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to