You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "Hensley, Richard" <Ri...@McKesson.com> on 2001/11/14 00:30:58 UTC

Which .jar files for 1.2-rc3

>From reading the build.xml and the readme.txt I come up with the
following jars that need to be in the classpath for Velocity to work.

oro.jar 
logkit-1.0.jar 
commons-collections.jar 

I understand that other .jar files can be needed when using the log4j
kit, but this seems to be the basic set. 

Is this correct? 

Richard Hensley 
mailto:richard.hensley@itb.mckhboc.com
<ma...@itb.mckhboc.com>  

Confidentiality Notice: This e-mail message, including any attachments,
is for the sole use of the intended recipients 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 e-mail and destroy all
copies of the original message.



Re: Which .jar files for 1.2-rc3

Posted by Bruce Altner <ba...@hq.nasa.gov>.
I apparently need help understaning how to use the stringSubstitution() 
method in the StringUtils class.  For a test I just wanted to
replace "!" with "?".

Here is a code snippet from the calling class:


         Hashtable rt = new Hashtable();
         rt.put("!","?");
         context.put ("utils", new StringUtils());   //so that I can use 
StringUtils methods
         context.put("rt",rt); 
//stringSubstitution requires a Hashtable of substitution values


The template I merge with this has the following:

#set ($teststring = "Are you going to Scarboro Fair!")
$rt
After substituion "$teststring" becomes 
"$utils.stringSubstitution($teststring,$rt)"

which comes out this way...

{!=?}
After substituion "Are you going to Scarboro Fair!" becomes "Are you going 
to Scarboro Fair!"

 From the first line of output I see that the replacement table (rt) is 
available but the string is not being replaced.
I must be missing the point of this method entirely. Can anyone explain it?

Thanks,
Bruce
_________________________________________________________________
"It's a magical world, Hobbes, ol' buddy...let's go exploring!" ---Calvin

Phone: 202-651-8553
Pager Email:8273479@skytel.com




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Which .jar files for 1.2-rc3

Posted by "Geir Magnusson Jr." <ge...@yahoo.com>.
On 11/13/01 6:30 PM, "Hensley, Richard" <Ri...@McKesson.com>
wrote:

> From reading the build.xml and the readme.txt I come up with the
> following jars that need to be in the classpath for Velocity to work.
> 
> oro.jar 
> logkit-1.0.jar 
> commons-collections.jar
> 
> I understand that other .jar files can be needed when using the log4j
> kit, but this seems to be the basic set.
> 
> Is this correct? 

Yes, but theres another option.

In the 1.2-rc3 release (and going forward), the default jar

   velocity-XX.jar

Will *not* contain any external dependencies that it needs to run, which it
did previously.  We do this to allow people who use some of those
dependencies (logkit, ORO, commons-collections.jar) to use other versions if
they want w/o any problems or conflicts.

However, there still exists a build target jar-dep which will build the jar
'the old way', including all the necessary external dependencies right in
the jar, 

   velocity-dep-XX.jar

And the final 1.2 release distro will have both jars for convenience for
those users that are used to using it the 'old way' and want to be able to
use what comes out of an official distribution ( and an obvious note to
explain the difference).

Does this make sense?


> 
> Richard Hensley 
> mailto:richard.hensley@itb.mckhboc.com
> <ma...@itb.mckhboc.com>
> 
> Confidentiality Notice: This e-mail message, including any attachments,
> is for the sole use of the intended recipients 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 e-mail and destroy all
> copies of the original message.
> 
> 
> 

-- 
Geir Magnusson Jr.                                     geirm@optonline.net
System and Software Consulting
"He who throws mud only loses ground." - Fat Albert


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>