commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly/xdocs faq.xml
Date Tue, 14 Jan 2003 08:22:26 GMT
jstrachan    2003/01/14 00:22:25

  Modified:    jelly/xdocs faq.xml
  Log:
  updated the FAQ to contain entries describing invoking Jelly from inside Java, from its
main, from Ant and Maven
  
  Revision  Changes    Path
  1.6       +86 -0     jakarta-commons-sandbox/jelly/xdocs/faq.xml
  
  Index: faq.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/xdocs/faq.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- faq.xml	18 Oct 2002 00:34:05 -0000	1.5
  +++ faq.xml	14 Jan 2003 08:22:25 -0000	1.6
  @@ -33,6 +33,26 @@
       <p><strong>Using Jelly</strong></p>
       <ol>
         <li>
  +        <a href="#calling-jelly">
  +          How do I call Jelly from Java code?
  +        </a>
  +      </li>
  +      <li>
  +        <a href="#command-line">
  +          How do I invoke Jelly from the command line?
  +        </a>
  +      </li>
  +      <li>
  +        <a href="#invoke-ant">
  +          How do I invoke Jelly from inside Ant?
  +        </a>
  +      </li>
  +      <li>
  +        <a href="#invoke-maven">
  +          How do I invoke Jelly from inside Maven?
  +        </a>
  +      </li>
  +      <li>
           <a href="#adding-taglibs">
             How do I add my own tag libraries to Jelly?
           </a>
  @@ -90,6 +110,72 @@
   
       </section>
       <section name="Using Jelly">
  +      <dl>
  +        <dt>
  +					<a href="#calling-jelly">
  +						How do I call Jelly from Java code?
  +					</a>
  +        </dt>
  +        <dd>
  +        	Try the following code. Note that the runScript() method below is overloaded and
can take a File, URL etc.
  +<code>
  +<pre>
  +// pass the output of the script somewhere
  +Writer someWriter = new FileWriter( "output.xml" );
  +XMLOutput output = XMLOutput.createXMLOutput( someWriter );
  +
  +// now run a script using a URL
  +JellyContext context = new JellyContext();
  +context.runScript( "foo.jelly", output );</pre>
  +</code>
  +        </dd>
  +      </dl>
  +
  +      <dl>
  +        <dt>
  +					<a href="#command-line">
  +						How do I invoke Jelly from the command line?
  +					</a>
  +        </dt>
  +        <dd>
  +        	When you build a binary disitribution of Jelly, 
  +        	there is a jelly script which works on Windows and Unixes to run Jelly.
  +        	You can create a binary distribution of Jelly via
  +        	<code>
  +        		maven dist
  +        	</code>
  +        </dd>
  +        <dd>
  +        	All you really need to do is to invoke the 
  +        	<i>org.apache.commons.jelly.Jelly</i> class from the command line
  +        	with a correct classpath.
  +        </dd>
  +      </dl>
  +      <dl>
  +        <dt>
  +					<a href="#invoke-ant">
  +						How do I invoke Jelly from inside Ant?
  +					</a>
  +        </dt>
  +        <dd>
  +        	There is an Ant task that comes with the Ant library called
  +        	<i>org.apache.commons.task.JellyTask</i> which can be taskdef'd in
any Ant script.
  +        </dd>
  +      </dl>
  +
  +      <dl>
  +        <dt>
  +					<a href="#invoke-maven">
  +						How do I invoke Jelly from inside Maven?
  +					</a>
  +        </dt>
  +        <dd>
  +        	Maven's maven.xml file is actually a Jelly script; so you can include any Jelly
script
  +        	inside any of the Maven goals. So if you want to execute a specific Jelly script
you can
  +        	just &lt;j:include uri="foo.jelly" &gt; it inside the maven.xml.
  +        </dd>
  +      </dl>
  +
         <dl>
           <dt>
             <a name="adding-taglibs">
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message