ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: AW: Ant <script> tag query
Date Wed, 01 Dec 2004 12:14:35 GMT
Yeah - sometimes we are fast - and sometimes we´re seeing also lot
of trees. BTW happy Xmas (mmmh what is -Xmas for a JVM option?)  ;-)

Jan

> -----Ursprüngliche Nachricht-----
> Von: Alex Feseto [mailto:alex@smoothwall.net]
> Gesendet am: Mittwoch, 1. Dezember 2004 13:11
> An: Ant Users List
> Betreff: Re: AW: Ant <script> tag query
> 
> Oh man, schoolboy error!
> 
> Couldn't see the wood for the trees even when I stripped it 
> down to that 
> simple example!
> 
> Thanks people, amazingly quick responses :-)
> 
> 
> Jan.Materne@rzf.fin-nrw.de wrote:
> > A valid close() would also do a flush().
> > Problem was that he didnt close the stream (and therefore 
> didnt flushed).
> > 
> > Jan
> > 
> > 
> >>-----Ursprüngliche Nachricht-----
> >>Von: Ivan Ivanov [mailto:rambiusparkisanius@yahoo.com]
> >>Gesendet am: Mittwoch, 1. Dezember 2004 13:06
> >>An: Ant Users List
> >>Betreff: Re: Ant <script> tag query
> >>
> >>Alex, flush the outfile, the follwing should works:
> >><project name="MyProject" basedir="." default="main">
> >>   <target name="main">
> >>     <script language="javascript"> <![CDATA[
> >>
> >>       importPackage(java.io);
> >>       var outfile = new PrintWriter(new
> >>FileWriter("test.txt"));
> >>		
> >>       outfile.println("Testing1");
> >>       outfile.println("Testing2");
> >>       outfile.flush();
> >>       outfile.close;
> >>				
> >>     ]]></script>
> >>   </target>
> >></project>
> >>
> >>--- Alex Feseto <alex@smoothwall.net> wrote:
> >>
> >>
> >>>Hi, I'm trying to write to a file using the <script>
> >>>tag...
> >>>
> >>>Everything config-wise is set up correctly (js.jar
> >>>et al) and the 
> >>>following snippet executes no problem.
> >>>
> >>>However, the resultant "outfile" is blank.
> >>>
> >>>
> >>><project name="MyProject" basedir="."
> >>>default="main">
> >>>   <target name="main">
> >>>     <script language="javascript"> <![CDATA[
> >>>
> >>>       importPackage(java.io);
> >>>       var outfile = new PrintWriter(new
> >>>FileWriter("test.txt"));
> >>>		
> >>>       outfile.println("Testing1");
> >>>       outfile.println("Testing2");
> >>>       outfile.close;
> >>>				
> >>>     ]]></script>
> >>>   </target>
> >>></project>
> >>>
> >>>
> >>>Apologies if this is an obvious question, but I'm
> >>>quite stuck!
> >>>
> >>>Any help would be greatly appreciated.
> >>>
> >>>
> >>>-- 
> >>>Regards,
> >>>
> >>>Alex Feseto
> >>>
> >>>
> >>>
> >>
> >>------------------------------------------------------------
> ---------
> >>
> >>>To unsubscribe, e-mail:
> >>>user-unsubscribe@ant.apache.org
> >>>For additional commands, e-mail:
> >>>user-help@ant.apache.org
> >>>
> >>>
> >>
> >>
> >>__________________________________________________
> >>Do You Yahoo!?
> >>Tired of spam?  Yahoo! Mail has the best spam protection around 
> >>http://mail.yahoo.com 
> >>
> >>------------------------------------------------------------
> ---------
> >>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> >>For additional commands, e-mail: user-help@ant.apache.org
> >>
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message