velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christoph Reck <Christoph.R...@dlr.de>
Subject Re: HelloWorld.vm not connecting HelloWorld.class
Date Mon, 01 Oct 2001 09:20:41 GMT
Probably you did not compile your *,java file into 
a class file and placed that class file into WEB-INF/classes
(check file dates to detect what the newest is...).

You will also probably need to restart the catalina server
(I believe the default is that it does not do class reloading).

:) Christoph


Gurumurthy R wrote:
> 
> yes,
> 
> i did the same.  i checked my .java file.
> 
> it contains;
> 
> context.put("hello","This is just sample");
> 
> i also checked the .log file, which says:
> 
> Velocity started successfully.
> 
> but .vm file not able to fetch the result ($hello) from .class file,
> 
> if u further help me in giving guidelines,  i will be great to you.  sorry for the trouble
i give.
> 
> thanks in advance,
> 
> expecting a reply from u,
> 
> thanks,
> 
> guru
> 
> On Fri, 28 Sep 2001 Christoph Reck wrote :
> 
> > Please check your log file. It seems that your servlet
> 
> > is being accessed,
> 
> > therefore velocity is running. Yout logfile will
> 
> > probably have a line
> 
> > saying that the $hello reference is not in the context.
> 
> >
> 
> > Ensure that you did:
> 
> >   ctx.put("hello", "...some sensible string here...");
> 
> >
> 
> > If your Catalina server did not start the velocity
> 
> > servlet, probably you
> 
> > did not configure the servlet container properly (e.g.
> 
> > to
> 
> > locate your servlet at "HelloWorld/servlet/HelloWorld/Tu-
> 
> > rbine")
> 
> > or you did not compile the servlet properly. Please
> 
> > read the
> 
> > documentation on how to get your servlet runnin (in
> 
> > case of turbine
> 
> > check the Turbine docs).
> 
> >
> 
> > I hope you can enter the wonderful velocity world now.
> 
> >
> 
> > :) Christoph
> 
> >
> 
> > One comment embedded below:
> 
> >
> 
> > Gurumurthy R wrote:
> 
> > >
> 
> > > Hello Folks,
> 
> > >
> 
> > > I wrote HelloWorld.vm and put in the appropriate
> 
> > template/screens directory.
> 
> > >
> 
> > > I also wrote HelloWorld.java and put in the
> 
> > /WEB-INF/classes directory.
> 
> > >
> 
> > > I started catalina server.
> 
> > >
> 
> > > My package name is: HelloWorld
> 
> > >
> 
> > > so, when I enter the URL in the browser like this:
> 
> > >
> 
> > > http://localhost:8080/HelloWorld/servlet/HelloWorld/Tu-
> 
> > rbine/template/HelloWorld.vm
> 
> >
> 
> > I would expect in a non-turbine environment:
> 
> >   http://localhost:8080/HelloWorld/servlet/template/Hell-
> 
> > oWorld.vm
> 
> > Where HelloWorld is your WEB-Application, template is
> 
> > the servlet responding
> 
> > to *.vm requests, and HelloWorld.vm is the template
> 
> > name located at the
> 
> s configured
> 
> > with.
> 
> >
> 
> > >
> 
> > > The output what I am getting is:
> 
> > >
> 
> > > $hello of the emergency broadcast station.
> 
> > >
> 
> > > (The problem is that $hello is not being replaced at
> 
> > all)
> 
> > >
> 
> > > Can you pl. help me?
> 
> > >
> 
> > > Thanks in advance,
> 
> > >
> 
> > > Guru
> 
>

Mime
View raw message