Results 1 to 3 of 3

Thread: #springUrl using Velocity

  1. #1
    Join Date
    Aug 2005
    Location
    San Francisco, CA
    Posts
    43

    Default #springUrl using Velocity

    Hi all,

    I'm trying to use #springUrl(...) macro in my velociy template but the following:
    Code:
    #springUrl("admin.css")
    outputs as:
    Code:
    $springMacroRequestContext.getContextPath()admin.css
    Any ideas?

    Thanks, Jon

  2. #2

    Default

    Do you have this property set on your VelocityViewResolver?
    Code:
    <property name="exposeSpringMacroHelpers"><value>true</value></property>

  3. #3
    Join Date
    Aug 2005
    Location
    San Francisco, CA
    Posts
    43

    Default

    Yes, but as it turned out, the view resolver wasn't being hit because I was using a VelocityLayoutView type view with explicit url refs to velocity template files within. All is good now. Thanks, Jon

Similar Threads

  1. Velocity and Classpath Mega-woes
    By jopaki in forum Web
    Replies: 2
    Last Post: May 9th, 2007, 03:21 AM
  2. How to configure Velocity tools?
    By alr in forum Web
    Replies: 7
    Last Post: Jan 31st, 2007, 09:38 AM
  3. FreeMarker vs Velocity
    By Martin Kersten in forum Architecture
    Replies: 8
    Last Post: May 30th, 2005, 09:21 AM
  4. Velocity OutOfMemoryError during UnitTests
    By camach in forum Container
    Replies: 2
    Last Post: May 26th, 2005, 05:28 PM
  5. Exposing velocity context
    By masum in forum Web
    Replies: 1
    Last Post: Oct 28th, 2004, 02:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •