You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Robert Lee <Ro...@rcn.com> on 2002/06/26 18:16:13 UTC

Building under Windows XP

As part of generating Velocity from the TDK. I made the following changes to
the build.xml in the webapps\xxx\WEB-INF\build directory.
<target name="set-windows2000" depends="set-windowsXP" if="isWindows 2000">
	<property name="is.Windows" value="true"/>
</target>
<target name="set-windowsXP" if="isWindows XP">
	property name="is.Windows" value="true"/>
</target>

Have other people been doing this or is there a better way?

Robert Lee



Re: [VelTool - Velocity Library] ParameterParser Issues

Posted by "Geir Magnusson Jr." <ge...@adeptra.com>.
On 6/28/02 5:31 AM, "Gabriel Sidler" <si...@teamup.ch> wrote:

> Jeff Duska wrote:
> 
> 
> This problem can be avoided if you use the "Quite Reference Notation".

"Quiet", as in "shhhhhh"

> Search the user guide
> http://jakarta.apache.org/velocity/user-guide.html#References
> for this term.
> 
> You would write it this way:
> 
> Random Number = $!reqParser.getString($request,"RandomNumber")
> 
> 

-- 
Geir Magnusson Jr. 
Research & Development, Adeptra Inc.
geirm@adeptra.com
+1-203-247-1713



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


Re: [VelTool - Velocity Library] ParameterParser Issues

Posted by Gabriel Sidler <si...@teamup.ch>.
Jeff Duska wrote:

> The source code and the documenation seem to be out of sync.
> 
> The documenation suggest using the following for the Toolbox.xml file.
> 
> <tool>
>   <key>reqParser</key>
>   <class>org.apache.velocity.tools.tools.RequestParser</class>
> </tool>


Yes, the documentation is wrong. I'fix that. Thanks for the report!


> I was able to get my code to work, but I wasn't happy with one thing. I 
> have the following line of VLT in my page.
> 
> Random Number = $reqParser.getString($request,"RandomNumber")
> 
> I pass RandomNumber in URL like productpurchase?RandomNumber=12341234. I 
> surprised that when I don't pass in RandomNumber at all it causes an 
> error and the VLT code is shown. I was expecting nothing to display. Am 
> I misunderstanding how Velocity handles this?
> 
> Here is the error out of the log file
> org.apache.velocity.runtime.exception.ReferenceException: reference : 
> template = /productpurchase.vm [line 3,column 17] : 
> $reqParser.getString($request,"RandomNumber") is not a valid reference.


This problem can be avoided if you use the "Quite Reference Notation".
Search the user guide http://jakarta.apache.org/velocity/user-guide.html#References
for this term.

You would write it this way:

Random Number = $!reqParser.getString($request,"RandomNumber")


Hope this helps

Gabe


--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland


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


[VelTool - Velocity Library] ParameterParser Issues

Posted by Jeff Duska <Je...@noaa.gov>.
The source code and the documenation seem to be out of sync.

The documenation suggest using the following for the Toolbox.xml file.

<tool>
   <key>reqParser</key>
   <class>org.apache.velocity.tools.tools.RequestParser</class>
</tool>

This doesn't work since the the class file is called ParameterParser. 
I'm not sure what you want to change. I changed the <class> element to

<class>org.apache.velocity.tools.tools.ParameterParser</class>

I was able to get my code to work, but I wasn't happy with one thing. I 
have the following line of VLT in my page.

Random Number = $reqParser.getString($request,"RandomNumber")

I pass RandomNumber in URL like productpurchase?RandomNumber=12341234. I 
surprised that when I don't pass in RandomNumber at all it causes an 
error and the VLT code is shown. I was expecting nothing to display. Am 
I misunderstanding how Velocity handles this?

Here is the error out of the log file
org.apache.velocity.runtime.exception.ReferenceException: reference : 
template = /productpurchase.vm [line 3,column 17] : 
$reqParser.getString($request,"RandomNumber") is not a valid reference.

Regards,

Jeff


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