epimorphics / elda

Epimorphics implementation of the Linked Data API
Other
53 stars 27 forks source link

elda documentation: *Rendering with Velocity* #175

Open jgrzebyta opened 7 years ago

jgrzebyta commented 7 years ago

I found following errors in the documentation:

  1. Line 8 in the example code of VelocityRenderer:
    api:variable [
     api:name "_resourceRoot"; 
     api:value "/myEldaApp"
    ];

If the user will not change default location of elda-assets that the resource name is "/elda-assets/".

  1. Line 12 the same place:
    api:variable [
     api:name "_velocityPath"; 
     api:value "/var/lib/tomcat7/local-assets/velocity, /var/lib/tomcat7/elda-assets/velocity"
    ]

    there should be before comma character in the api:value otherwise does not work. Thus correct value is:

    api:value "/var/lib/tomcat7/local-assets/velocity , /var/lib/tomcat7/elda-assets/velocity"
ashleysommer commented 7 years ago

I ran into a similar problem with 1.3.19 I fixed it (a hacky workaround) by defining VELOCITY_PATH=",/velocity" environment variable. You can see in the source here: https://github.com/epimorphics/elda/blob/master/elda-lda/src/main/java/com/epimorphics/lda/renderers/velocity/VelocityRendering.java#L224 It adds defaultVelocityRoot to the end of the search string, and defaultVelocityRoot comes from the VELOCITY_PATH environment variable.

It may not be exactly the same problem, as this, but that fixed it for me.

ehedgehog commented 7 years ago

I have been unable to reproduce the problem. Could you provide a complete minimal example, please?

Chris