[prev in list] [next in list] [prev in thread] [next in thread]
List: velocity-user
Subject: Re: Re: HelloWorld.vm not connecting HelloWorld.class
From: "Gurumurthy R" <gurubbc () rediffmail ! com>
Date: 2001-09-28 10:48:49
[Download RAW message or body]
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
> template directory your velocity instance is 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
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic