You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "David Tonhofer, m-plify S.A." <d....@m-plify.com> on 2002/01/03 20:52:30 UTC

A call to correct the Velocity servlet_example1...pretty pretty please?

Right!

Pox on whosoever set up the Velocity distribution's "servlet example 1" !

In retrospect I should have known better but I'm just back from
nearly punching holes into walls because I couldn't get the Velocity
servlet example 1 to work (yes, the most stupid & simple one).

Well, it turns out that one needs something called a
"velocity.properties" file which should be adequately filled in,
like so:

----
file.resource.loader.path = <path-to-whatever-the-webapp-dir-is>
runtime.log = velocity.log
----

And it should reside in the webapp directory, otherwise there is *no
way* the fileloader is ever going to stumble upon the humble file
called "sample.vm" which supposedly has only to be copied to the
webapp directory. Yeah, right.

So, I suggest to at least put a sample "velocity.properties" file
into the distribution AND make add a note regarding this to the
f***ing README.

Still fuming,

	-- David


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


Re: A call to correct the Velocity servlet_example1...pretty pretty please?

Posted by "David Tonhofer, m-plify S.A." <d....@m-plify.com>.

--On Thursday, January 03, 2002 3:02 PM -0500 "Geir Magnusson Jr." 
<ge...@optonline.net> wrote:

> Actually, for servlet example 1, I am not sure that it is needed.  I will
> admit its a lousy example, but that's why there is #2.  We should remove
> #1.
>
># 1 was meant to be self configuring, but I suspect you are using a servlet
> engine that doesn't support getRealPath() ?

It think it does, it's Tomcat 3.3. Or doesn't it?


Best,

	-- David


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


Re: A call to correct the Velocity servlet_example1...pretty pretty please?

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 1/3/02 3:17 PM, "Steven Caswell" <st...@yahoo.com> wrote:

> Geir, I don't think servlet_example1 should be removed.  Yes, fix it if
> getRealPath() is a problem.  Or explain that the servlet engine needs to
> support getRealPath().  Documentation can always be improved.  But don't
> remove the example.  It is the simplest thing to set up and is a great
> starting place for understanding Velocity without the complexity of loaders
> and property files and such.

Ok.  Good feedback.

I thought servlet example 2 was simple too, but we'll keep #1.

It would be good for David to verify that getRealPath() was the problem as
it was a SWAG...

> 
> -----Original Message-----
> From: Geir Magnusson Jr. [mailto:geirm@optonline.net]
> Sent: Thursday, January 03, 2002 3:02 PM
> To: velocity-user@jakarta.apache.org
> Subject: Re: A call to correct the Velocity servlet_example1...pretty
> pretty please?
> 
> 
> On 1/3/02 2:52 PM, "David Tonhofer, m-plify S.A." <d....@m-plify.com>
> wrote:
> 
>> Right!
>> 
>> Pox on whosoever set up the Velocity distribution's "servlet example 1" !
> 
> That was me.
> 
>> 
>> In retrospect I should have known better but I'm just back from
>> nearly punching holes into walls because I couldn't get the Velocity
>> servlet example 1 to work (yes, the most stupid & simple one).
> 
> Oh, I just punch the walls.  Make it a hard one, because repairing plaster
> tends to make one feel dumb.
> 
>> 
>> Well, it turns out that one needs something called a
>> "velocity.properties" file which should be adequately filled in,
>> like so:
>> 
>> ----
>> file.resource.loader.path = <path-to-whatever-the-webapp-dir-is>
>> runtime.log = velocity.log
>> ----
>> 
>> And it should reside in the webapp directory, otherwise there is *no
>> way* the fileloader is ever going to stumble upon the humble file
>> called "sample.vm" which supposedly has only to be copied to the
>> webapp directory. Yeah, right.
>> 
>> So, I suggest to at least put a sample "velocity.properties" file
>> into the distribution AND make add a note regarding this to the
>> f***ing README.
>> 
>> Still fuming,
> 
> Actually, for servlet example 1, I am not sure that it is needed.  I will
> admit its a lousy example, but that's why there is #2.  We should remove #1.
> 
> #1 was meant to be self configuring, but I suspect you are using a servlet
> engine that doesn't support getRealPath() ?
> 
> I have a fix for that, as I am worried that we will be touched by it more
> and more.
> 
> Thanks for the heads up - it will be fixed...
> 
>> -- David
>> 
>> 
>> --
>> To unsubscribe, e-mail:
>> <ma...@jakarta.apache.org>
>> For additional commands, e-mail:
>> <ma...@jakarta.apache.org>
>> 
> 
> --
> Geir Magnusson Jr.                                     geirm@optonline.net
> System and Software Consulting
> "He who throws mud only loses ground." - Fat Albert
> 
> 
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> 
> 
> 
> 
> _________________________________________________________
> 
> 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>
> 

-- 
Geir Magnusson Jr.     geirm@optonline.net
System and Software Consulting
"Whoever would overthrow the liberty of a nation must begin by subduing the
freeness of speech." - Benjamin Franklin



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


RE: A call to correct the Velocity servlet_example1...pretty pretty please?

Posted by Steven Caswell <st...@yahoo.com>.
Geir, I don't think servlet_example1 should be removed.  Yes, fix it if
getRealPath() is a problem.  Or explain that the servlet engine needs to
support getRealPath().  Documentation can always be improved.  But don't
remove the example.  It is the simplest thing to set up and is a great
starting place for understanding Velocity without the complexity of loaders
and property files and such.

-----Original Message-----
From: Geir Magnusson Jr. [mailto:geirm@optonline.net]
Sent: Thursday, January 03, 2002 3:02 PM
To: velocity-user@jakarta.apache.org
Subject: Re: A call to correct the Velocity servlet_example1...pretty
pretty please?


On 1/3/02 2:52 PM, "David Tonhofer, m-plify S.A." <d....@m-plify.com>
wrote:

> Right!
>
> Pox on whosoever set up the Velocity distribution's "servlet example 1" !

That was me.

>
> In retrospect I should have known better but I'm just back from
> nearly punching holes into walls because I couldn't get the Velocity
> servlet example 1 to work (yes, the most stupid & simple one).

Oh, I just punch the walls.  Make it a hard one, because repairing plaster
tends to make one feel dumb.

>
> Well, it turns out that one needs something called a
> "velocity.properties" file which should be adequately filled in,
> like so:
>
> ----
> file.resource.loader.path = <path-to-whatever-the-webapp-dir-is>
> runtime.log = velocity.log
> ----
>
> And it should reside in the webapp directory, otherwise there is *no
> way* the fileloader is ever going to stumble upon the humble file
> called "sample.vm" which supposedly has only to be copied to the
> webapp directory. Yeah, right.
>
> So, I suggest to at least put a sample "velocity.properties" file
> into the distribution AND make add a note regarding this to the
> f***ing README.
>
> Still fuming,

Actually, for servlet example 1, I am not sure that it is needed.  I will
admit its a lousy example, but that's why there is #2.  We should remove #1.

#1 was meant to be self configuring, but I suspect you are using a servlet
engine that doesn't support getRealPath() ?

I have a fix for that, as I am worried that we will be touched by it more
and more.

Thanks for the heads up - it will be fixed...

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

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


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



_________________________________________________________
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>


Re: A call to correct the Velocity servlet_example1...pretty pretty please?

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 1/3/02 2:52 PM, "David Tonhofer, m-plify S.A." <d....@m-plify.com>
wrote:

> Right!
> 
> Pox on whosoever set up the Velocity distribution's "servlet example 1" !

That was me.

> 
> In retrospect I should have known better but I'm just back from
> nearly punching holes into walls because I couldn't get the Velocity
> servlet example 1 to work (yes, the most stupid & simple one).

Oh, I just punch the walls.  Make it a hard one, because repairing plaster
tends to make one feel dumb.

> 
> Well, it turns out that one needs something called a
> "velocity.properties" file which should be adequately filled in,
> like so:
> 
> ----
> file.resource.loader.path = <path-to-whatever-the-webapp-dir-is>
> runtime.log = velocity.log
> ----
> 
> And it should reside in the webapp directory, otherwise there is *no
> way* the fileloader is ever going to stumble upon the humble file
> called "sample.vm" which supposedly has only to be copied to the
> webapp directory. Yeah, right.
> 
> So, I suggest to at least put a sample "velocity.properties" file
> into the distribution AND make add a note regarding this to the
> f***ing README.
> 
> Still fuming,

Actually, for servlet example 1, I am not sure that it is needed.  I will
admit its a lousy example, but that's why there is #2.  We should remove #1.

#1 was meant to be self configuring, but I suspect you are using a servlet
engine that doesn't support getRealPath() ?

I have a fix for that, as I am worried that we will be touched by it more
and more.

Thanks for the heads up - it will be fixed...

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

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


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