RE: $link

"Logan Stinger" <[email protected]> Thu, 19 Feb 2015 08:40:19 -0600
Newsgroups gmane.comp.jakarta.velocity.user
Message-ID <[email protected]>
SOLR uses response writers to convert a SOLR response in to the desired output format.  There are various response writers you can use right out of the box and you can control which one is used via command line parameters or via solrconfig.xml file.  Ie. wt=xml, wt=json, wt=velocity
The VelocityResponseWriter class has a hard coded list of tools that it injects in to the context.  I don't know what version of velocity you are using but the link below is the source of the VelocityResponseWriter for version 3.5.  I'm sure later versions of this class are similar.  I have a custom version of this class in my project that only injects the tools I use/need.

http://grepcode.com/file/repo1.maven.org/maven2/org.apache.solr/solr-velocity/3.5.0/org/apache/solr/response/VelocityResponseWriter.java

-----Original Message-----
From: [email protected] [mailto:[email protected]] 
Sent: Thursday, February 19, 2015 8:03 AM
To: Velocity Users List
Subject: Re: $link

Hi,

I am using the SOLR version of Velocity, running in Tomcat, which doesn't seem to have a toolbox.xml file. I have manually created such a file, and added it to

...apache-tomcat-8.0.15/webapps/solr/WEB-INF

but to no avail.

Philippe



----- Mail original -----
De: "Mike Kienenberger" <[email protected]>
À: "Velocity Users List" <[email protected]>
Envoyé: Jeudi 19 Février 2015 14:30:14
Objet: Re: $link

Add "link" to your velocity toolbox.xml file.

If you search for "<key>math</key>", you should be able to find the file and then add a new entry for "link"

See LinkTool.html for more information specific to link.

http://velocity.apache.org/tools/devel/view/LinkTool.html


See config.html for general information on tool configuration.

http://velocity.apache.org/tools/releases/2.0/config.html


On Thu, Feb 19, 2015 at 5:59 AM,  <[email protected]> wrote:
> Hi,
>
> how do you access $link in velocity templates?
>
> I have access to $math, but not link.
>
> Many thanks.
>
> Philippe
>
> ---------------------------------------------------------------------
> 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]