You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Travis Walters <tw...@shawsystems.com> on 2006/01/12 21:03:28 UTC

issues with extra newline characters in my output.

I'm having a problem with unwanted newline characters in my output that 
I'm hoping someone can help with.  I've looked through the archive and 
saw a few postings that suggested I add ## at the end of my vtl 
commands.  When I try to do this I get a parse exception (the reference 
book I've been using tells me this won't work also).  Here's a snippet 
of the offending code:


    #if ($car.relationshipType == "PRIMARY")
        Encountered a primary customer so I skipped it!
    #end


If I change this snippet in my template to:
 
    #if ($car.relationshipType == "PRIMARY")##
        Encountered a primary customer so I skipped it!
    #end

I get a parse exception.  I'm using version 1.4 of Velocity in case this 
matters.  These templates are used for mail merge/text message formatted 
messages so the newline char at the end of the if stmt is causing grief.


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: issues with extra newline characters in my output.

Posted by Nathan Bubna <nb...@gmail.com>.
weird.  this is the first i've heard of such a thing.  i would not
have guessed that the error was due to no java-recognizable new line
characters being in the file.  of course, that's probably not all that
surprising though since i've never worked with rich text format stuff
and don't even know what you mean by "the /par code".  does this mean
that the template source file is not plain text (ascii or unicode)? 
if so, i'm surprised it works at all.  if not, i wonder if your
encoding settings are relevant.

just curious/wondering...  i don't really have any expertise to help
you further.

On 1/12/06, Travis Walters <tw...@shawsystems.com> wrote:
> The multi line comment suggestion you provided does work though it's not
> much to look at in the template (Thanks!).  After looking at my data
> stream in the debugger I have a theory as to what's happening.  The text
> stream I'm passing to velocity is in rich text format which among other
> things seems to mean that carriage returns are represented by the /par
> code.  Velocity doesn't seem to recognize this as an end of line marker
> so the code associated with ## is looking for an end of line marker and
> not finding one (till it hits the EOF marker).  This would also explain
> why my #if isn't gobbling the end of line marker as I was hoping that it
> would.
>
> I've included the relevant part of the stack trace below.  This is what
> happens when I try to add ## to the end of one of my lines of vtl.
> org.apache.velocity.exception.ParseErrorException: Lexical error:
> org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line
> 1, column 200003.  Encountered: <EOF> after : ""
>     at org.apache.velocity.app.Velocity.evaluate(Velocity.java:286)
>     at org.apache.velocity.app.Velocity.evaluate(Velocity.java:210)
>     at
> shaw.spectrum.core.document.domain.TemplateProcessor.doParse(TemplateProcessor.java:144)
>     at
> shaw.spectrum.core.document.domain.TemplateProcessor.parseTemplate(TemplateProcessor.java:62)
>
>
> Here's a bit more of the template with the data it produced so you can
> see what's happening:
>
>  Loop through all customer's that are associated with the account and
> print out their names and addresses.
>  #foreach ($car in $account.relationships)
>         $!car.customer.honorific $!car.customer.firstName
> $!car.customer.lastName
>     #if ($car.customer.getAddress("PRIMARY").streetAddressLine1)
>         $!car.customer.getAddress("PRIMARY").streetAddressLine1
>         $!car.customer.getAddress("PRIMARY").streetAddressLine2
>         $!car.customer.getAddress("PRIMARY").city
> $!car.customer.getAddress("PRIMARY").state,
> $!car.customer.getAddress("PRIMARY").postalCode
>     #else
>         $!car.customer.getAddress("PRIMARY").streetNumber
> $!car.customer.getAddress("PRIMARY").streetDirection
> $!car.customer.getAddress("PRIMARY").streetName
> $!car.customer.getAddress("PRIMARY").thoroughfareType
> $!car.customer.getAddress("PRIMARY").unitNumber
>         $!car.customer.getAddress("PRIMARY").city
> $!car.customer.getAddress("PRIMARY").state,
> $!car.customer.getAddress("PRIMARY").postalCode
>     #end
>  #end
>
> output from a rendered browser session:
>
> Loop through all customer's that are associated with the account and
> print out their names and addresses.
>
>
>
>                         MR Harold Martinez
>
>
>
>                         242 Park Drive
>
>                         CCCC
>
>                         Richmond VA, 23228
>
>
>
>
>
>                         MR David Moore
>
>
>
>                         3539  Lamar ST
>
>                         Lincoln NE, 68520
>
>
>  Note the blank line between the name and address (each of the
> if,else,end,foreach commands is leaving behind the line break.
>
>
>
>
>
>
>
> Nathan Bubna wrote:
>
> >what is the exception complaining about?  i'm curious to know what
> >error it claims.
> >
> >have you tried this with Velocity 1.5-dev?  yes, it isn't a final
> >release, but it is quite stable and long-tested.
> >if you really can't have the content on the same line (e.g. #if( $foo
> >) bar #end), then you can probably just use an empty block comment
> >instead:
> >
> >#if( $whatever )#*
> >*#    blah blah blah.
> >#end
> >
> >also, i'm fairly certain that if your #if statement is on a line with
> >no other white space (before or after), then the newline will be
> >gobbled.
> >
> >and don't forget to register your opinion on the
> >who-knows-when-it'll-happen upgrade to whitespace handling:
> >
> >http://wiki.apache.org/jakarta-velocity/VelocityWhitespaceGobbling
> >
> >:-)
> >On 1/12/06, Travis Walters <tw...@shawsystems.com> wrote:
> >
> >
> >>I'm having a problem with unwanted newline characters in my output that
> >>I'm hoping someone can help with.  I've looked through the archive and
> >>saw a few postings that suggested I add ## at the end of my vtl
> >>commands.  When I try to do this I get a parse exception (the reference
> >>book I've been using tells me this won't work also).  Here's a snippet
> >>of the offending code:
> >>
> >>
> >>    #if ($car.relationshipType == "PRIMARY")
> >>        Encountered a primary customer so I skipped it!
> >>    #end
> >>
> >>
> >>If I change this snippet in my template to:
> >>
> >>    #if ($car.relationshipType == "PRIMARY")##
> >>        Encountered a primary customer so I skipped it!
> >>    #end
> >>
> >>I get a parse exception.  I'm using version 1.4 of Velocity in case this
> >>matters.  These templates are used for mail merge/text message formatted
> >>messages so the newline char at the end of the if stmt is causing grief.
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> >>
> >>
> >>
> >>
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: issues with extra newline characters in my output.

Posted by Travis Walters <tw...@shawsystems.com>.
The multi line comment suggestion you provided does work though it's not 
much to look at in the template (Thanks!).  After looking at my data 
stream in the debugger I have a theory as to what's happening.  The text 
stream I'm passing to velocity is in rich text format which among other 
things seems to mean that carriage returns are represented by the /par 
code.  Velocity doesn't seem to recognize this as an end of line marker 
so the code associated with ## is looking for an end of line marker and 
not finding one (till it hits the EOF marker).  This would also explain 
why my #if isn't gobbling the end of line marker as I was hoping that it 
would.

I've included the relevant part of the stack trace below.  This is what 
happens when I try to add ## to the end of one of my lines of vtl.
org.apache.velocity.exception.ParseErrorException: Lexical error: 
org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line 
1, column 200003.  Encountered: <EOF> after : ""
    at org.apache.velocity.app.Velocity.evaluate(Velocity.java:286)
    at org.apache.velocity.app.Velocity.evaluate(Velocity.java:210)
    at 
shaw.spectrum.core.document.domain.TemplateProcessor.doParse(TemplateProcessor.java:144)
    at 
shaw.spectrum.core.document.domain.TemplateProcessor.parseTemplate(TemplateProcessor.java:62)


Here's a bit more of the template with the data it produced so you can 
see what's happening:

 Loop through all customer's that are associated with the account and 
print out their names and addresses.
 #foreach ($car in $account.relationships)  
        $!car.customer.honorific $!car.customer.firstName 
$!car.customer.lastName
    #if ($car.customer.getAddress("PRIMARY").streetAddressLine1)
        $!car.customer.getAddress("PRIMARY").streetAddressLine1
        $!car.customer.getAddress("PRIMARY").streetAddressLine2
        $!car.customer.getAddress("PRIMARY").city 
$!car.customer.getAddress("PRIMARY").state, 
$!car.customer.getAddress("PRIMARY").postalCode
    #else
        $!car.customer.getAddress("PRIMARY").streetNumber 
$!car.customer.getAddress("PRIMARY").streetDirection 
$!car.customer.getAddress("PRIMARY").streetName 
$!car.customer.getAddress("PRIMARY").thoroughfareType 
$!car.customer.getAddress("PRIMARY").unitNumber
        $!car.customer.getAddress("PRIMARY").city 
$!car.customer.getAddress("PRIMARY").state, 
$!car.customer.getAddress("PRIMARY").postalCode
    #end
 #end

output from a rendered browser session:

Loop through all customer's that are associated with the account and 
print out their names and addresses.

  

                        MR Harold Martinez

           

                        242 Park Drive

                        CCCC

                        Richmond VA, 23228

           

  

                        MR David Moore

           

                        3539  Lamar ST 

                        Lincoln NE, 68520


 Note the blank line between the name and address (each of the 
if,else,end,foreach commands is leaving behind the line break.







Nathan Bubna wrote:

>what is the exception complaining about?  i'm curious to know what
>error it claims.
>
>have you tried this with Velocity 1.5-dev?  yes, it isn't a final
>release, but it is quite stable and long-tested.
>if you really can't have the content on the same line (e.g. #if( $foo
>) bar #end), then you can probably just use an empty block comment
>instead:
>
>#if( $whatever )#*
>*#    blah blah blah.
>#end
>
>also, i'm fairly certain that if your #if statement is on a line with
>no other white space (before or after), then the newline will be
>gobbled.
>
>and don't forget to register your opinion on the
>who-knows-when-it'll-happen upgrade to whitespace handling:
>
>http://wiki.apache.org/jakarta-velocity/VelocityWhitespaceGobbling
>
>:-)
>On 1/12/06, Travis Walters <tw...@shawsystems.com> wrote:
>  
>
>>I'm having a problem with unwanted newline characters in my output that
>>I'm hoping someone can help with.  I've looked through the archive and
>>saw a few postings that suggested I add ## at the end of my vtl
>>commands.  When I try to do this I get a parse exception (the reference
>>book I've been using tells me this won't work also).  Here's a snippet
>>of the offending code:
>>
>>
>>    #if ($car.relationshipType == "PRIMARY")
>>        Encountered a primary customer so I skipped it!
>>    #end
>>
>>
>>If I change this snippet in my template to:
>>
>>    #if ($car.relationshipType == "PRIMARY")##
>>        Encountered a primary customer so I skipped it!
>>    #end
>>
>>I get a parse exception.  I'm using version 1.4 of Velocity in case this
>>matters.  These templates are used for mail merge/text message formatted
>>messages so the newline char at the end of the if stmt is causing grief.
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: Latest Production Version of Velocity

Posted by Will Glass-Husain <wg...@forio.com>.
Hi Nathan,

There was an extra ^M at the end of each line.  Removing this made the cgi 
page worked.  Actually, I was a little surprised, I thought the real web 
site was mirrored with a 5 hour update delay.  But editing files in 
cvs.apache.org in the following directory immediately impacted our web site. 
I then went ahead and changed the subversion (copying over one of the other 
working download files) to make sure this was permanent.

For the record:
file:
/x1/www/jakarta.apache.org/site/downloads/downloads_velocity.cgi

To fix this:
svn delete downloads_velocity.cgi
svn copy downloads_turbine.cgi downloads_velocity.cgi

The cause seemed to be that the wrong property "svn:eof-style" was set 
instead of "svn:eol-style", so newlines weren't converted.  I've fixed this 
so it shouldn't reoccur.

WILL

----- Original Message ----- 
From: "Nathan Bubna" <nb...@gmail.com>
To: "Velocity Developer's List" <ve...@jakarta.apache.org>
Sent: Thursday, January 12, 2006 1:25 PM
Subject: Re: Latest Production Version of Velocity


so what was the problem and the fix?

On 1/12/06, Will Glass-Husain <wg...@forio.com> wrote:
> I just fixed it.  Follow up on the dev list.  This should be working now.
>
> Edward - Sorry for the problems you were having.  We'll dig into this.
>
> Best,
> WILL
>
> ----- Original Message -----
> From: "Nathan Bubna" <nb...@gmail.com>
> To: "Velocity Users List" <ve...@jakarta.apache.org>
> Sent: Thursday, January 12, 2006 1:11 PM
> Subject: Re: Latest Production Version of Velocity
>
>
> works for me as of 1:10pm PST.   i don't get it.  we keep seeing
> reports of this, but everytime i go to check it works.  maybe i need
> to use IE or something, but i rather doubt it.
>
> Edward, what error were you getting?
>
> On 1/12/06, Will Glass-Husain <wg...@forio.com> wrote:
> > Looking into this right now...
> >
> > ----- Original Message -----
> > From: "Edward Song" <es...@royalmedia.com>
> > To: "'Velocity Users List'" <ve...@jakarta.apache.org>
> > Sent: Thursday, January 12, 2006 12:40 PM
> > Subject: Latest Production Version of Velocity
> >
> >
> > > Can anyone send me the latest GA download of velocity.
> > > No dependency version.
> > >
> > > The website URL to download the latest version
> > > http://jakarta.apache.org/site/downloads/downloads_velocity.cgi
> > >
> > > Seems to have been down all day.
> > >
> > > Thanks,
> > > Ed
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Re: Latest Production Version of Velocity

Posted by Nathan Bubna <nb...@gmail.com>.
so what was the problem and the fix?

On 1/12/06, Will Glass-Husain <wg...@forio.com> wrote:
> I just fixed it.  Follow up on the dev list.  This should be working now.
>
> Edward - Sorry for the problems you were having.  We'll dig into this.
>
> Best,
> WILL
>
> ----- Original Message -----
> From: "Nathan Bubna" <nb...@gmail.com>
> To: "Velocity Users List" <ve...@jakarta.apache.org>
> Sent: Thursday, January 12, 2006 1:11 PM
> Subject: Re: Latest Production Version of Velocity
>
>
> works for me as of 1:10pm PST.   i don't get it.  we keep seeing
> reports of this, but everytime i go to check it works.  maybe i need
> to use IE or something, but i rather doubt it.
>
> Edward, what error were you getting?
>
> On 1/12/06, Will Glass-Husain <wg...@forio.com> wrote:
> > Looking into this right now...
> >
> > ----- Original Message -----
> > From: "Edward Song" <es...@royalmedia.com>
> > To: "'Velocity Users List'" <ve...@jakarta.apache.org>
> > Sent: Thursday, January 12, 2006 12:40 PM
> > Subject: Latest Production Version of Velocity
> >
> >
> > > Can anyone send me the latest GA download of velocity.
> > > No dependency version.
> > >
> > > The website URL to download the latest version
> > > http://jakarta.apache.org/site/downloads/downloads_velocity.cgi
> > >
> > > Seems to have been down all day.
> > >
> > > Thanks,
> > > Ed
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Re: Latest Production Version of Velocity

Posted by Will Glass-Husain <wg...@forio.com>.
I just fixed it.  Follow up on the dev list.  This should be working now.

Edward - Sorry for the problems you were having.  We'll dig into this.

Best,
WILL

----- Original Message ----- 
From: "Nathan Bubna" <nb...@gmail.com>
To: "Velocity Users List" <ve...@jakarta.apache.org>
Sent: Thursday, January 12, 2006 1:11 PM
Subject: Re: Latest Production Version of Velocity


works for me as of 1:10pm PST.   i don't get it.  we keep seeing
reports of this, but everytime i go to check it works.  maybe i need
to use IE or something, but i rather doubt it.

Edward, what error were you getting?

On 1/12/06, Will Glass-Husain <wg...@forio.com> wrote:
> Looking into this right now...
>
> ----- Original Message -----
> From: "Edward Song" <es...@royalmedia.com>
> To: "'Velocity Users List'" <ve...@jakarta.apache.org>
> Sent: Thursday, January 12, 2006 12:40 PM
> Subject: Latest Production Version of Velocity
>
>
> > Can anyone send me the latest GA download of velocity.
> > No dependency version.
> >
> > The website URL to download the latest version
> > http://jakarta.apache.org/site/downloads/downloads_velocity.cgi
> >
> > Seems to have been down all day.
> >
> > Thanks,
> > Ed
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


RE: Latest Production Version of Velocity

Posted by Edward Song <es...@royalmedia.com>.
Working for me now.  I was able to download the zip file successfully.

Previously I was getting an Internal 500 Server Error Page served up by
apache, and this was occuring for me all day.  I browsed the rest of the
site with no problems, and even other download pages for other apache
products were up and running, so it was this page alone.

I sent an email to the webmaster email address provided.
Here is what the error looked like.  

Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.

Please contact the server administrator, webmaster@apache.org and inform
them of the time the error occurred, and anything you might have done that
may have caused the error.

More information about this error may be available in the server error log.

No other real details about it.  Hope this helps.  


Regards,
Edward Song
Director of Web Systems
www.banknet360.com

-----Original Message-----
From: Nathan Bubna [mailto:nbubna@gmail.com] 
Sent: Thursday, January 12, 2006 4:12 PM
To: Velocity Users List
Subject: Re: Latest Production Version of Velocity

works for me as of 1:10pm PST.   i don't get it.  we keep seeing
reports of this, but everytime i go to check it works.  maybe i need to use
IE or something, but i rather doubt it.

Edward, what error were you getting?

On 1/12/06, Will Glass-Husain <wg...@forio.com> wrote:
> Looking into this right now...
>
> ----- Original Message -----
> From: "Edward Song" <es...@royalmedia.com>
> To: "'Velocity Users List'" <ve...@jakarta.apache.org>
> Sent: Thursday, January 12, 2006 12:40 PM
> Subject: Latest Production Version of Velocity
>
>
> > Can anyone send me the latest GA download of velocity.
> > No dependency version.
> >
> > The website URL to download the latest version 
> > http://jakarta.apache.org/site/downloads/downloads_velocity.cgi
> >
> > Seems to have been down all day.
> >
> > Thanks,
> > Ed
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: 
> > velocity-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: 
> > velocity-user-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: Latest Production Version of Velocity

Posted by Nathan Bubna <nb...@gmail.com>.
works for me as of 1:10pm PST.   i don't get it.  we keep seeing
reports of this, but everytime i go to check it works.  maybe i need
to use IE or something, but i rather doubt it.

Edward, what error were you getting?

On 1/12/06, Will Glass-Husain <wg...@forio.com> wrote:
> Looking into this right now...
>
> ----- Original Message -----
> From: "Edward Song" <es...@royalmedia.com>
> To: "'Velocity Users List'" <ve...@jakarta.apache.org>
> Sent: Thursday, January 12, 2006 12:40 PM
> Subject: Latest Production Version of Velocity
>
>
> > Can anyone send me the latest GA download of velocity.
> > No dependency version.
> >
> > The website URL to download the latest version
> > http://jakarta.apache.org/site/downloads/downloads_velocity.cgi
> >
> > Seems to have been down all day.
> >
> > Thanks,
> > Ed
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: velocity-user-help@jakarta.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: Latest Production Version of Velocity

Posted by Will Glass-Husain <wg...@forio.com>.
Looking into this right now...

----- Original Message ----- 
From: "Edward Song" <es...@royalmedia.com>
To: "'Velocity Users List'" <ve...@jakarta.apache.org>
Sent: Thursday, January 12, 2006 12:40 PM
Subject: Latest Production Version of Velocity


> Can anyone send me the latest GA download of velocity.
> No dependency version.
> 
> The website URL to download the latest version
> http://jakarta.apache.org/site/downloads/downloads_velocity.cgi
> 
> Seems to have been down all day.
> 
> Thanks,
> Ed
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Latest Production Version of Velocity

Posted by Edward Song <es...@royalmedia.com>.
Can anyone send me the latest GA download of velocity.
No dependency version.

The website URL to download the latest version
http://jakarta.apache.org/site/downloads/downloads_velocity.cgi

Seems to have been down all day.

Thanks,
Ed


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: issues with extra newline characters in my output.

Posted by Nathan Bubna <nb...@gmail.com>.
what is the exception complaining about?  i'm curious to know what
error it claims.

have you tried this with Velocity 1.5-dev?  yes, it isn't a final
release, but it is quite stable and long-tested.
if you really can't have the content on the same line (e.g. #if( $foo
) bar #end), then you can probably just use an empty block comment
instead:

#if( $whatever )#*
*#    blah blah blah.
#end

also, i'm fairly certain that if your #if statement is on a line with
no other white space (before or after), then the newline will be
gobbled.

and don't forget to register your opinion on the
who-knows-when-it'll-happen upgrade to whitespace handling:

http://wiki.apache.org/jakarta-velocity/VelocityWhitespaceGobbling

:-)
On 1/12/06, Travis Walters <tw...@shawsystems.com> wrote:
> I'm having a problem with unwanted newline characters in my output that
> I'm hoping someone can help with.  I've looked through the archive and
> saw a few postings that suggested I add ## at the end of my vtl
> commands.  When I try to do this I get a parse exception (the reference
> book I've been using tells me this won't work also).  Here's a snippet
> of the offending code:
>
>
>     #if ($car.relationshipType == "PRIMARY")
>         Encountered a primary customer so I skipped it!
>     #end
>
>
> If I change this snippet in my template to:
>
>     #if ($car.relationshipType == "PRIMARY")##
>         Encountered a primary customer so I skipped it!
>     #end
>
> I get a parse exception.  I'm using version 1.4 of Velocity in case this
> matters.  These templates are used for mail merge/text message formatted
> messages so the newline char at the end of the if stmt is causing grief.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org