RE: $link
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: phi...@free.fr [mailto:phi...@free.fr] 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 mkien...@gmail.com À: Velocity Users List user@velocity.apache.org Envoyé: Jeudi 19 Février 2015 14:30:14 Objet: Re: $link Add link to your velocity toolbox.xml file. If you search for keymath/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, phi...@free.fr 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: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org - To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org - To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org - To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org
RE: Standalone pages
It depends on the contents of your velocity file. If your velocity file contains no variables that need replaced by the velocity engine and is simply an html page then the answer is yes. You simply need to place the file in a directory that is accessible via url. I'm assuming you have an images folder or some other folder where you can currently access image from e.g. img src=myserver:8983/images/myimage.png/ You would simply put your velocity file in a similar directory and reference it http://myserver:8983/static/velocityfile.vm. You would also need to make sure your server is configured to send the proper content-type headers for such a request (map .vm extensions to content-type text/html). If your velocity file is not static and has variables or velocity code that needs processed then your best bet might be to create a filter such that urls of *.vm get processed by this filter and the results spit out. -Original Message- From: phi...@free.fr [mailto:phi...@free.fr] Sent: Thursday, October 09, 2014 8:13 AM To: Velocity Users List Subject: Re: Standalone pages Hi Erik, thank you for your reply. However, come to think of it, my question is not SOLR-specific. I would like to know if it is possible to create lightweight Web pages with Velocity, in Tomcat, without resorting to servlets, JSP, etc. In other words, can you add a Velocity template to a Tomcat server as easily as you can drop a .php file in an Apache server's DocumentRoot directory. Many thanks. Philippe - Mail original - De: Erik Hatcher erik.hatc...@gmail.com À: Velocity Users List user@velocity.apache.org Envoyé: Jeudi 9 Octobre 2014 14:59:02 Objet: Re: Standalone pages Philiippe - I just noticed you posted this to the velocity user list. How Solr uses Velocity is perhaps a bit niche/different, so best to ask over on the Solr user list for future questions about the Solr/Velocity integration. But I’m on both lists :) Erik On Oct 9, 2014, at 4:19 AM, phi...@free.fr wrote: Hello, I am using currently the Velocity templates that come with the example provided with SOLR, in Tomcat 7. I would like to add a Velocity template called test.vm, in the example/solr/mycollection directory, to display an HTML page containing an image. Unfortunately, the following URL http://myserver:8983/solr/mycollection/test returns a 404 error. http://myserver:8983/solr/mycollection/browse works, though. How does one create standalone Velocity pages, such as test.vm? Many thanks. Philippe - To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org - To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org - To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org - To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org For additional commands, e-mail: user-h...@velocity.apache.org
Velocity log file
I'm using velocity as part of Solr. I am deploying my web app on JBossAS 6.0.0. The velocity.log file is being created in the directory I start jboss from. Where do I configure where the velocity.log file gets written too? Logan Stinger Description: bluelid_logo_small (515) 281-6702 (515) 822-8212 mailto:lstin...@bluelid.com lstin...@bluelid.com
Velocity.log file location
I'm using a nightly build of Solr 4.0 and I'm deploying the solr.war file to jboss 6.0.0. The velocity.log file gets written to the directory I'm in when I start JBoss. Where do I specify where this log file should be written too? Logan Stinger Description: bluelid_logo_small (515) 281-6702 (515) 822-8212 mailto:lstin...@bluelid.com lstin...@bluelid.com