velocity

How do I add a pages breadcrumbs to an action in a Confluence Plugin?

I'm writing a plugin for Confluence and there isn't much documentation on what you can use in velocity vm files. I'm able to add a base breadcrumb that goes from Dashboard -> ActionName but I want to to do something similar to page edits where you get the full page breadcrumb followed by the action name. Here's what I'm using now: #app...

Why should I learn and use struts?

I'm a java developer, not seasoned, but I am familiar with most concepts reasonably well. I recently built a website using Tomcat/JSP (~30 dynamic pages). I made the newbie mistake of including large sections of core logic in the JSP, using the rationalization that it's "just a simple project". I learned the hard way. So I'm re-buildin...

maven-eclipse-plugin with Velocity plugin

Hi, I wonder if anyone have come across a problem with that when using maven-eclipse-plugin together with velocity plugin for Mave generate a random dependency which causes build error because of missing the artifacts of some irrelevant modules within the build? I could not find any explicit clue of how that problem causing dependenc...

VTL evaluate or define an object reference

Hi, I would like to create a macro that takes a string as a parameter and evaluates that to an object. Something like: #macro( valueTest $objRef) #define( $obj )#evaluate("$${objRef}")#end $obj.foo ## This would have to be translated to $obj.getFoo() #end Unfortunately the $obj variable does not point to object reference that cou...

Spring - how to handle exception

I am using Spring with Velocity. At times velocity produces an exception like Error in interpolating string literal : org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getMessage' in class org.springframework.web.servlet.support.RequestContext threw exception class org.springframework.context.NoSuchMess...

How do I get started using Apache Velocity to generate web page; using m4 now

What I do now: I use the m4 macro package to generate .html files. I have macros defined in one file (macros.m4), with things like: define(`_imt_start_clip', `<a bunch of html code>') And I have another file (videos.m4) that uses the macros: _imt_start_clip(`Persons name', `link to video clip', `name of jpg file') To generate my we...

Problem with Velocity - ResourceNotFoundException when using with Spring MVC

I am using Spring MVC for my web application and I am integrating Velocity for templating my emails. I am getting the following 500 error when It attempts to send my email. org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource '/WEB-INF/velocity/registrationEmail.vm' I am aware of what this means and what ...

How do I calculate the magnitude of the velocity of my mouse cursor, in Python?

http://dl.dropbox.com/u/779859/speedCalc_puradata.JPG I achieved it in pure data, have a look at the schematic of what I'm thinking: Recieving Midi Control input from ctlin 20 and 21 Pipe delays whatever signal it recieves Pythagoras Viola, the speed of the input. The units don't matter, as long as it is absolute. I was thinking abo...

STILL: How can I access a Velocity template from a sub-subdirectory with a custom ViewResolver?

I need help creating a custom *ViewResolver * I have a velocity template rendering VXML that is located at /billing/billingQuestionsMenu_pp.vm then, in that template, I am forwarding to: <submit next="#springUrl('/billing/billingQuestions/billingQuestionsMenuOption1.vxml')" /> Now in my Controller, I have a mapped method: @Reques...

Velocity: Is it better to use a Velocity Macro or #include(...) statement for a DIV block repeated many times on different pages?

I have about 10 standard blocks of dynamically generated HTML that get included on a large percentage of pages on my site (informational sidebars). I can use #include statements or define them as a macros, both would work. What's better? I'm new to Velocity and migrating a site from JSP. Why use one vs the other? Why have #include wh...

Velocity can't find resource with webApp.

Hello, I'm trying to create a webApp using GlashFish server and Velocity. But i get the following error: SEVERE: ResourceManager : unable to find resource 'temp.vm' in any resource loader. SEVERE: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'temp.vm' velocity.proprieties: resource.loader=web...