velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "carlo latasa" <clat...@gmail.com>
Subject Problems using Tags...
Date Sun, 30 Nov 2008 23:33:00 GMT
Hello all,

I'm relatively new to Velocity. I've got an older application for a client
of mine that was written using xwork and velocity for the html presentation.
I'm trying to move the application to struts 2 and the latest version of
Velocity before I do more development on it.

There are 2 specific problems that I'm having.

1) - I'm getting the following error when I try to load (from my browser) a
.vm with a tag #sform("action=... .  I get similar errors for tags like
#stextfield, #spassword, #ssubmit.

org.apache.velocity.exception.ResourceNotFoundException: Unable to find
resource '/template//template/xhtml//form.vm'
    at
org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:458)
    at
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:341)
    at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:831)
    at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:813)
    at
org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:470)
    at
org.apache.struts2.components.template.VelocityTemplateEngine.renderTemplate(VelocityTemplateEngine.java:74)
    at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:530)
    at
org.apache.struts2.components.ClosingUIBean.start(ClosingUIBean.java:58)
....

This is confusing considering that the form.vm is in
struts2-core-2.0.11.2.jar. Is there a configuration setting that I'm
missing? I can include my velocity.properties, web.xml, struts.xml if
necessary. I'm using velocity-1.4.jar, velocity-dep-1.4.jar,
velocity-tools-1.1.jar but it also happened with the 1.5 version jars.


2) - Is there support in struts2 and Velocity 1.4 + for the older velocity
tags of the form: #tag( TextField, #tag( Submit etc? If so, is there any
special configuration that I need to support it? I as only because the
client has hundreds of .vm pages written using these tags and I would like
to just use them as is.

Thank you very much in advance.

-- 
Carlo Latasa
EdgeDriven.com
Cell: (415) 385-1567

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message