On 9/25/06, Brenton Strine <[EMAIL PROTECTED]> wrote:
Ah. I'm an idiot. So what is the good of the binary anyway if you can't use velocity with it? And why is it *before* the source if it's less important?
In general (this is true for most open source projects), the binary distribution files are just the fully compiled code and perhaps documentation. These are typically downloaded by those who have apps that are already dependent on that library or otherwise already know how to use it. The source distribution serves two main purposes. a) It exists to satisfy license conditions (not open source if the source is not distributed). b) It's useful for those learning to hack on and/or use the project and/or its examples.
Thanks so much for pointing that out to me. It worked! (yaay) So I've copied "examples\simple" to the tomcat webapps directory, and velocity code is working there as it says on the tutorial! (yaay again). However, I can't get any other directories to display velocity. Even when I copied "simple"! Am I forever limited to coding all my velocity in this simple directory? I feel like a complete simpleton, but what exactly allows "simple" to be a valid folder for velocity, while "simple2" just gives me errors?
This is how servlets work. Servlets are mapped to url patterns. By default when you drop a .war file or a directory into the Tomcat webapp folder, the name of that folder and/or war file is necessarily part of the url. These things can be changed, but that's the default. As far as writing/running Velocity templates in general, you can do that anywhere. Velocity is great for any text generation needs and can work from absolutely anywhere. It needn't necessarily have anything to do with Tomcat or webapps. It's just that most people use Velocity in webapps and the examples that come with VelocityTools are a good way to get started with that. Of course, even in webapps, you can configure Velocity to load templates from anywhere, regardless of your Tomcat configuration or url path. Look in the developer guide about configuring resource loaders once you are ready to learn more about that.
Brenton PS I thought whomever has the power to change the webapps tutorial might like to know that the tutorial (step 4) talks about several things being in the "examples" directory when they're actually under "examples/simple"... It just made an already confused person that much more confused. -----Original Message----- From: Nathan Bubna [mailto:[EMAIL PROTECTED] Sent: Monday, September 25, 2006 5:38 PM To: Velocity Users List Subject: Re: Installing velocity Ah. You downloaded, the binary. You need to download the source distribution. http://apache.gr-linux.com/jakarta/velocity-tools/source/ velocity-tools-1.2-src.zip I believe the tutorial says to get the source, though it probably just mentioned it in passing, rather than making it clear. On 9/25/06, Brenton Strine <[EMAIL PROTECTED]> wrote: > There is no file called "build.xml" in velocity-tools-1.2.zip > anywhere. I even did a search. I > *have* typed the ant commands in the root directory of the velocity > tools. Maybe I'm confused about what the root directory is. I unzipped > velocity tools into "C:\vtools". (So that inside C:\vtools is a folder > called "velocity-tools-1.2".)I then opened the shell, navigated to > "C:\vtools", and typed the commands. I also navigated to > "C:\vtools\velocity-tools-1.2" and typed the ant commands. > > I also have tried doing this with the velocity tools unzipped in the > same directory as I have velocity itself in. > > Brenton > > By the way, this is the zip I've been downloading. > Perhaps I have the wrong file?? > http://apache.gr-linux.com/jakarta/velocity-tools/binarie > s/velocity-tools-1.2.zip > > > > -----Original Message----- > From: Nathan Bubna [mailto:[EMAIL PROTECTED] > Sent: Monday, September 25, 2006 12:49 PM > To: Velocity Users List > Subject: Re: Installing velocity > > Where is the build.xml? Your command prompt should be working in the > directory where the build.xml file is for ant to find it. So, after > you unzipped the velocity-tools distribution, go to the root directory > of it and then type the ant command(s). > > On 9/25/06, Brenton Strine <[EMAIL PROTECTED]> > wrote: > > Yes, I've looked through that tutorial, but I can't get > through it. > > > > It says "Build the Velocity Tools jar and the "simple" > > example by typing: ant example.simple" and in the > readme file it says > > "To build the project, start ant in the root directory > of the project: > > > ant". > > > > However, when I do either of these, all I ever get is > > "Buildfile: build.xml does not exist! Build failed". > > > > I'm typing these commands in cmd.exe and I've tried it > in the > > directory velocity-tools-1.2, > velocity-tools-1.2\examples, and a few > > other things. > > > > My velocity-tools-1.2 directory is inside the velocity > directory. Is > > that bad? What's the problem? > > > > Brenton > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Will > Glass-Husain > > Sent: Saturday, September 23, 2006 8:37 PM > > To: Velocity Users List > > Subject: Re: Installing velocity > > > > Have you read the tutorial on webapps I linked to in > the previous > > email? > > > > Download the subproject "Velocity Tools". Look for the > tutorial on > > using ""VelocityViewServlet" and follow that. > > > > WILL > > > > On 9/23/06, Brenton Strine <[EMAIL PROTECTED]> > > wrote: > > > Perhaps actually, what I mean to ask is what I need > to > > do to *use* > > > Velocity. Because I'm pretty sure I have Velocity > > installed. I did the > > > whole ant thing, and I also did ant test, and > > everything seems fine. > > > But if it's installed, then why aren't .vm files > > executed as velocity? > > > What do I have to do so that I can write some > velocity > > code and see > > > the output? > > > > > > Brenton > > > > > > -----Original Message----- > > > From: Brenton Strine > [mailto:[EMAIL PROTECTED] > > > Sent: Saturday, September 23, 2006 5:43 PM > > > To: Velocity Users List > > > Subject: Installing velocity > > > > > > I've downloaded the tomcat windows exectutable > (5.5.17) > > and ran it. It > > > seems to have installed perfectly, and furthermore, > is > > somehow > > > integrated with apache! > > > > > > I have velocity downloaded (not to mention jdk and > ant > > installed)... > > > But I don't know how to install velocity. I assume > I've > > got everything > > > I need. So how do I install Velocity now? > > > > > > Thanks everyone, > > > > > > Brenton > > > > > > > > > --------------------------------------------------------- > > > ------------ > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > --------------------------------------------------------- > > ------------ > > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > > > > > > -- > > Forio Business Simulations > > > > Will Glass-Husain > > [EMAIL PROTECTED] > > www.forio.com > > > > > --------------------------------------------------------- > > ------------ > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > --------------------------------------------------------- > ------------ > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > --------------------------------------------------------- > ------------ > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > --------------------------------------------------------- ------------ > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------- ------------ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]