You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Jeff Duska <Je...@noaa.gov> on 2002/05/20 21:05:47 UTC

Help! VelocityViewServlet simple example doesn't work for me...

  I've tried to build this twice with Ant. In each case, I created the 
simple.war. Next, I copy this over to my Tomcat webapps directory. I 
restart Tomcat. I type in http://localhost:8080/simple/index.vm. I get 
the the template served up, but the replace / text subsitution for 
$toytool.getMessage() doesn't happen. The strange thing is that I see 
TOOLBOX SETUP! when I start my instance of Tomcat. Help! I'm not sure 
where to go from here.

Thanks,

Jeff Duska


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Veltools] VVS simple example Was: Help! VelocityViewServlet simple example doesn't work for me...

Posted by Gabriel Sidler <si...@teamup.ch>.
Jeff Duska wrote:

> Nathan Bubna wrote:
> 
>> Jeff,
>>
>> Ok, a couple things...
>>
> Your changes fixed it. Thanks.
> 
>> second, here's what you can do to get it running...
>>
>> 1. replace the velocity-tools-view jar in the WEB_INF\lib of the simple
>> example.  the one in cvs is version 0.3 when 0.7 is the current.  
>> (Gabe, we
>> should pull this and any other precompiled vel-tool jars out of cvs and
>> change the build file to use the locally built jars.)
>>
> +1 IMHO, this is the way this need to work -- otherwise I'd forget to 
> update something that needs updating.



It's fixed and commited.

Thanks for the report.

Gabe



--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Veltools] VVS simple example Was: Help! VelocityViewServlet simple example doesn't work for me...

Posted by Jeff Duska <Je...@noaa.gov>.
Nathan Bubna wrote:

>Jeff,
>
>Ok, a couple things...
>
Your changes fixed it. Thanks.

>second, here's what you can do to get it running...
>
>1. replace the velocity-tools-view jar in the WEB_INF\lib of the simple
>example.  the one in cvs is version 0.3 when 0.7 is the current.  (Gabe, we
>should pull this and any other precompiled vel-tool jars out of cvs and
>change the build file to use the locally built jars.)
>
+1 IMHO, this is the way this need to work -- otherwise I'd forget to 
update something that needs updating.




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Veltools] VVS simple example Was: Help! VelocityViewServlet simple example doesn't work for me...

Posted by Nathan Bubna <na...@esha.com>.
Jeff,

Ok, a couple things...

first, the simple example in cvs is not up to date with the latest version
of the velocity-tools-view code.  the joys of unreleased code :-)

second, here's what you can do to get it running...

1. replace the velocity-tools-view jar in the WEB_INF\lib of the simple
example.  the one in cvs is version 0.3 when 0.7 is the current.  (Gabe, we
should pull this and any other precompiled vel-tool jars out of cvs and
change the build file to use the locally built jars.)

2. make the toolbox.xml look like this:

<?xml version="1.0"?>
<toolbox>
  <tool>
    <key>toytool</key>
    <class>ToyTool</class>
  </tool>
</toolbox>

3.  build the example.  to do this, i had to make the following changes, and
then execute the "compile" target.


Index: build.xml
===================================================================
RCS file:
/home/cvspublic/jakarta-velocity-tools/view/examples/simple/build.xml,v
retrieving revision 1.3
diff -u -r1.3 build.xml
--- build.xml 9 Jan 2002 11:26:39 -0000 1.3
+++ build.xml 20 May 2002 19:43:54 -0000
@@ -31,6 +31,11 @@
   <target name="init">
     <!-- Create the time stamp -->
     <tstamp/>
+    <mkdir dir="${CLASSES}"/>
   </target>


@@ -52,7 +57,7 @@
   </target>


-  <target name="compile" depends="">
+  <target name="compile" depends="init">
     <!-- Compile the java code from ${SRC} into ${CLASSES} -->
     <javac srcdir="${SRC}"
            includes="*/**"


that should get things going!

Nathan Bubna
nathan@esha.com





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Help! VelocityViewServlet simple example doesn't work for me...

Posted by Nathan Bubna <na...@esha.com>.
ack.  monday.  ignore me.  the key is set to "toytool".  i just didn't pay
attention.  i guess it would help if i actually tried to run the example
before spouting off like i know something.

Nathan Bubna
nathan@esha.com

----- Original Message -----
From: "Nathan Bubna" <na...@esha.com>
To: "Velocity Users List" <ve...@jakarta.apache.org>
Sent: Monday, May 20, 2002 12:12 PM
Subject: Re: Help! VelocityViewServlet simple example doesn't work for me...


> ah.  the toolbox.xml for the simple example contains
>   <tool>
>     <key>toytool</key>
>     <class>ToyTool</class>
>   </tool>
>
> so the template needs to say
>
> $ToyTool.getMessage()
>
> instead of
>
> $toytool.getMessage()
>
> velocity is case sensitive.  if Gabe, Geir or some other committer
wouldn't
> mind fixing that so newbie's like Jeff don't get surprised, that'd be
great.
>
> Nathan Bubna
> nathan@esha.com
>
> ----- Original Message -----
> From: "Jeff Duska" <Je...@noaa.gov>
> To: <ve...@jakarta.apache.org>
> Sent: Monday, May 20, 2002 12:05 PM
> Subject: Help! VelocityViewServlet simple example doesn't work for me...
>
>
> >   I've tried to build this twice with Ant. In each case, I created the
> > simple.war. Next, I copy this over to my Tomcat webapps directory. I
> > restart Tomcat. I type in http://localhost:8080/simple/index.vm. I get
> > the the template served up, but the replace / text subsitution for
> > $toytool.getMessage() doesn't happen. The strange thing is that I see
> > TOOLBOX SETUP! when I start my instance of Tomcat. Help! I'm not sure
> > where to go from here.
> >
> > Thanks,
> >
> > Jeff Duska
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Help! VelocityViewServlet simple example doesn't work for me...

Posted by Nathan Bubna <na...@esha.com>.
ah.  the toolbox.xml for the simple example contains
  <tool>
    <key>toytool</key>
    <class>ToyTool</class>
  </tool>

so the template needs to say

$ToyTool.getMessage()

instead of

$toytool.getMessage()

velocity is case sensitive.  if Gabe, Geir or some other committer wouldn't
mind fixing that so newbie's like Jeff don't get surprised, that'd be great.

Nathan Bubna
nathan@esha.com

----- Original Message -----
From: "Jeff Duska" <Je...@noaa.gov>
To: <ve...@jakarta.apache.org>
Sent: Monday, May 20, 2002 12:05 PM
Subject: Help! VelocityViewServlet simple example doesn't work for me...


>   I've tried to build this twice with Ant. In each case, I created the
> simple.war. Next, I copy this over to my Tomcat webapps directory. I
> restart Tomcat. I type in http://localhost:8080/simple/index.vm. I get
> the the template served up, but the replace / text subsitution for
> $toytool.getMessage() doesn't happen. The strange thing is that I see
> TOOLBOX SETUP! when I start my instance of Tomcat. Help! I'm not sure
> where to go from here.
>
> Thanks,
>
> Jeff Duska
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>