You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by piero de salvia <pi...@yahoo.com> on 2001/07/20 20:35:36 UTC

VelocityEngine

Hi guys,

I'm having a bit of trouble with a file in the CVS,
namely whiteboard/geir/velocity_src_20010715.tgz , my
system says it's corrupted. 

since I have been waiting to try this stuff VERY VERY
EAGERLY, will somebody give me a list of method
signatures in VelocityEngine ?

thanks

and remember guys, we aren't Velocity users by
chance...we rule!

piero de salvia

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Re: VelocityEngine

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
piero de salvia wrote:
> 
> Hi guys,
> 
> I'm having a bit of trouble with a file in the CVS,
> namely whiteboard/geir/velocity_src_20010715.tgz , my
> system says it's corrupted.

Hm.

> 
> since I have been waiting to try this stuff VERY VERY
> EAGERLY, will somebody give me a list of method
> signatures in VelocityEngine ?
> 

I will upload a new src tonight, as I fixed (I hope) the #parse()/Eval()
problem reported by Dan, and since Dan is using the new single instance
(I think), I want that to be there for him.

I will also put the fix into CVS HEAD.

Anyone else, give the new VelocityEngine version a try - it's the same
as CVS HEAD except for the [widespread] changes to make single instance
possible.  These changes aren't really functional ( I did fix a small
bug or two...)  I don't want to continue too long with this not checked
in, as I have to do double work each time there is a fix (see above :),
so we should decide after a few people try it.

geir

> 
> and remember guys, we aren't Velocity users by
> chance...we rule!
> 
> piero de salvia
> 
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
Be well, do good work, and keep in touch.

Re: #parse doesn't work with evaluate()

Posted by Dan Finkelstein <da...@emind.com>.
This new jar worked great !! We are very, very happy campers !!

Thanks Geir,

Dan

PS -- The reason that Piero can't read the 
whiteboard/geir/velocity_src_20010722.tgz file is that it wasn't added with 
the "-kb" flag -- for binary files.



At 10:40 PM 7/22/01 -0400, you wrote:
>Dan Finkelstein wrote:
> >
> > Here's an odd one.   It happens in the 1.2 dev jar, not in Velocity
> > 1.0.  #parse fails when evaluate() is used but works ok with
> > getTemplate()/merge().
>
>[SNIP]
>
>This is now fixed in both CVS HEAD as well as the proposed version in
>/whiteboard/geir.
>
>I am uploading a new source tree for the 'single instance' code as well
>as a jar, so anyone interested in the new separate instance stuff should
>use the whiteboard version - it is up to date with CVS HEAD, and
>everyone else should give the new jar from whiteboard a try in their
>existing apps to make sure that the latest changes don't do any harm.
>It shouldn't :) The more testers the merrier.
>
>geir
>
>--
>Geir Magnusson Jr.                           geirm@optonline.net
>System and Software Consulting
>Developing for the web?  See http://jakarta.apache.org/velocity/
>Be well, do good work, and keep in touch.

Dan Finkelstein
Senior Architect, Instructional Tools & Technology
eMind LLC
Northern California Annex
1250 Addison St, Suite #210
Berkeley, CA 94702-1700
Tel: (510) 486-2740
Fax: (510)486-2843

Visit us at <http://www.emind.com/>

This email message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message.


Re: #parse doesn't work with evaluate()

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
The reason why this doesn't work is because I have been a distracted
dunderhead lately and I didn't fix it when I fixed #inculde() - I will
have the fix in tonight...  I know what it is...

geir


Dan Finkelstein wrote:
> 
> Here's an odd one.   It happens in the 1.2 dev jar, not in Velocity
> 1.0.  #parse fails when evaluate() is used but works ok with
> getTemplate()/merge().
> 
> We have templates that begin something like this line:
> 
>         #parse ("global.vm")
> 
> It has a bunch of #set-s.  Typical lines might be something like
> 
>         #set ($jFontFace = 'Arial, Helvetica, Tahoma, Verdana, sans-serif')
>         #set ($style_author = "font-family: $jFontFace; font-size: 12pt; color:
> #CCCCCC")
> 
> What we really want is for this file to be read in before every template is
> processed, sort of like a global define.  Now, when we run our processor,
> velocity.log contains this error:
> 
>         Fri Jul 20 15:16:36 PDT 2001  [error] #parse : cannot find global.vm template!
> 
> Weird.  Now, if I change the line to
> 
>         #include ("global.vm")
> 
> then it finds the file just fine.  Strange, huh?
> 
> I included some small files so you can replicate it easily....
> 
> Thanks again,
> Dan
> 
> 
> 
>   ------------------------------------------------------------------------
> 
>    test.vmName: test.vm
>           Type: Plain Text (text/plain)
> 
>    Example.javaName: Example.java
>                Type: Plain Text (text/plain)
> 
>    example.vmName: example.vm
>              Type: Plain Text (text/plain)
> 
>   ------------------------------------------------------------------------
> Dan Finkelstein
> Senior Architect, Instructional Tools & Technology
> eMind LLC
> Northern California Annex
> 1250 Addison St, Suite #210
> Berkeley, CA 94702-1700
> Tel: (510) 486-2740
> Fax: (510)486-2843
> 
> Visit us at <http://www.emind.com/>
> 
> This email message is for the sole use of the intended recipient(s) and may
> contain confidential and privileged information. Any unauthorized review,
> use, disclosure or distribution is prohibited. If you are not the intended
> recipient, please contact the sender by reply email and destroy all copies
> of the original message.

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!

Re: #parse doesn't work with evaluate()

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Dan Finkelstein wrote:
> 
> Here's an odd one.   It happens in the 1.2 dev jar, not in Velocity
> 1.0.  #parse fails when evaluate() is used but works ok with
> getTemplate()/merge().

[SNIP]

This is now fixed in both CVS HEAD as well as the proposed version in
/whiteboard/geir.

I am uploading a new source tree for the 'single instance' code as well
as a jar, so anyone interested in the new separate instance stuff should
use the whiteboard version - it is up to date with CVS HEAD, and
everyone else should give the new jar from whiteboard a try in their
existing apps to make sure that the latest changes don't do any harm. 
It shouldn't :) The more testers the merrier.

geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
Be well, do good work, and keep in touch.

Re: #parse doesn't work with evaluate()

Posted by Jon Stevens <jo...@latchkey.com>.
on 7/20/01 4:04 PM, "Dan Finkelstein" <da...@emind.com> wrote:

> Here's an odd one.   It happens in the 1.2 dev jar, not in Velocity
> 1.0.  #parse fails when evaluate() is used but works ok with
> getTemplate()/merge().
> 
> We have templates that begin something like this line:
> 
> #parse ("global.vm")
> 
> It has a bunch of #set-s.  Typical lines might be something like
> 
> #set ($jFontFace = 'Arial, Helvetica, Tahoma, Verdana, sans-serif')
> #set ($style_author = "font-family: $jFontFace; font-size: 12pt; color:
> #CCCCCC")
> 
> What we really want is for this file to be read in before every template is
> processed, sort of like a global define.  Now, when we run our processor,
> velocity.log contains this error:
> 
> Fri Jul 20 15:16:36 PDT 2001  [error] #parse : cannot find global.vm template!
> 
> Weird.  Now, if I change the line to
> 
> #include ("global.vm")
> 
> then it finds the file just fine.  Strange, huh?
> 
> I included some small files so you can replicate it easily....
> 
> Thanks again,
> Dan

I would not say that is strange, more a lack of clarity...

I bet what is happening is that #parse is failing to properly parse the file
and therefore, it isn't available to the resource loader. #include doesn't
parse the file.

Now, the question is...why aren't you using #parse to load the file and not
the velocimacro.library= property?

-jon


#parse doesn't work with evaluate()

Posted by Dan Finkelstein <da...@emind.com>.
Here's an odd one.   It happens in the 1.2 dev jar, not in Velocity 
1.0.  #parse fails when evaluate() is used but works ok with 
getTemplate()/merge().

We have templates that begin something like this line:

	#parse ("global.vm")

It has a bunch of #set-s.  Typical lines might be something like

	#set ($jFontFace = 'Arial, Helvetica, Tahoma, Verdana, sans-serif')
	#set ($style_author = "font-family: $jFontFace; font-size: 12pt; color: 
#CCCCCC")

What we really want is for this file to be read in before every template is 
processed, sort of like a global define.  Now, when we run our processor, 
velocity.log contains this error:

	Fri Jul 20 15:16:36 PDT 2001  [error] #parse : cannot find global.vm template!

Weird.  Now, if I change the line to

	#include ("global.vm")

then it finds the file just fine.  Strange, huh?

I included some small files so you can replicate it easily....

Thanks again,
Dan