You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Geir Magnusson Jr." <ge...@optonline.net> on 2000/11/16 20:24:52 UTC
Re: template.loader syntax in velocity.properties : parser fix
I found and fixed Christoph's template bug. I will check them in later
when the template.path issue is solved. If anyone wants a copy of the
Parser stuff that fixes it, let me know and I will send it..
geir
"Geir Magnusson Jr." wrote:
>
> Christoph Reck wrote:
> >
> > Hi,
> >
> > I'm trying to run velocity standalone via the ...test.misc.Test.java
> > class to be able to track down some problems and supply the fixes.
>
> 0) What is the problem you originally were trying to solve?
>
> 1) If this was a fresh CVS tree, there are a few problems because of the
> work that Jason did on the Runtime/Loader/Template system. We know what
> they are and are being worked on.
>
> For now, I would suggest hardwiring, or backup to the 2 day old nightly
> build.
>
> That might be the best course, the 2 day old nightly build....
>
> > Since I'm running JBuilder under Win95, it's having trouble with
> > the loading path (it doesn't find the properties nor the template
> > at '.').
> >
> > Hardwiring the path to velocity.properties brings other bugs into
> > appearance:
> > * Runtime.java is accessing "external_init" from the properties,
> > but it's not there, so bang :(
> > -> could you add it to the example properties files and maybe
> > change lines 340 and 409 to do a getString on EXTERNAL_INIT
> > with an empty "" default value?
>
> Yes, that's fixed. Throw "false" in there if you wish as the default.
>
> > * The current properties file contain a single template.loader
> > entry. Runtime.java is searching for template.loader.N entries.
> > The TemplateFactory is trying to access some "class" parameter
> > of it.
> > -> What is the current syntax for the template.loader entry(s)?
>
> Yep, that is the fix Jason has coming. Will be explained when done, but
> it's recognized as a problem. Affects Torque, Turbine and Texen as
> well, so know you are not alone :)
>
> > The bug I'm trying to track is that
> > ----
> > foo
> > ## ##
> > bar
> > ----
> > emits
> > ----
> > foo
> > ----
> > swallowing the bar (seems like the second ## within a ## makes this!
> >
> > Also if the file would end after bar (without a EOL), it throws an
> > exception:
> > Lexical error at line 4, column 4. Encountered: <EOF> after : ""
>
> I'll nail that one now, if you want. Simple parser issue... my bad...
>
> > Thanks for any help,
> > :) Christoph
>
> --
> Geir Magnusson Jr. geirm@optonline.com
> Dakota tribal wisdom: "when you discover you are riding a dead horse,
> the best strategy is to dismount."
--
Geir Magnusson Jr. geirm@optonline.com
Dakota tribal wisdom: "when you discover you are riding a dead horse,
the best strategy is to dismount."