You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by carlo latasa <cl...@gmail.com> on 2008/12/01 00:33:00 UTC

Problems using Tags...

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

Re: Problems using Tags...

Posted by Nathan Bubna <nb...@gmail.com>.
Hi Carlo,

These tags you speak of are all developed, supported and released by
the Struts project.  Someone may have an answer here, but i expect
that you will get a quicker/better answer to your questions on
user@struts.apache.org.

-nathan

On Sun, Nov 30, 2008 at 3:33 PM, carlo latasa <cl...@gmail.com> wrote:
> 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
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Re: Problems using Tags...

Posted by Nathan Bubna <nb...@gmail.com>.
http://struts.apache.org/2.0.14/docs/velocity.html
http://struts.apache.org/2.0.14/docs/velocity-tags.html
http://www.google.com/search?domains=struts.apache.org&sitesearch=struts.apache.org&q=velocity

best i can do offhand.  you might also google for webwork and
velocity, as much of that may be pertinent to Struts 2 also (Struts 2
is largely the next version of WebWork rebranded).

On Mon, Dec 1, 2008 at 6:42 PM, carlo latasa <cl...@gmail.com> wrote:
> Hello Nathan,
>
> Just wondering if you had any links to more detailed and involved
> documentation on struts 2 and velocity? I've posted to the struts list but
> was wondering if you had any links. I've googled and googled but not found a
> whole lot.
>
> Thanks,
>
> Carlo.
>
> On Mon, Dec 1, 2008 at 1:26 PM, carlo latasa <cl...@gmail.com> wrote:
>
>> Thanks Nathan!
>>
>>
>> On Sun, Nov 30, 2008 at 3:33 PM, carlo latasa <cl...@gmail.com> wrote:
>>
>>> 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
>>>
>>
>>
>>
>> --
>> Carlo Latasa
>> EdgeDriven.com
>> Cell: (415) 385-1567
>>
>
>
>
> --
> Carlo Latasa
> EdgeDriven.com
> Cell: (415) 385-1567
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Re: Problems using Tags...

Posted by carlo latasa <cl...@gmail.com>.
Hello Nathan,

Just wondering if you had any links to more detailed and involved
documentation on struts 2 and velocity? I've posted to the struts list but
was wondering if you had any links. I've googled and googled but not found a
whole lot.

Thanks,

Carlo.

On Mon, Dec 1, 2008 at 1:26 PM, carlo latasa <cl...@gmail.com> wrote:

> Thanks Nathan!
>
>
> On Sun, Nov 30, 2008 at 3:33 PM, carlo latasa <cl...@gmail.com> wrote:
>
>> 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
>>
>
>
>
> --
> Carlo Latasa
> EdgeDriven.com
> Cell: (415) 385-1567
>



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

Re: Problems using Tags...

Posted by carlo latasa <cl...@gmail.com>.
Thanks Nathan!

On Sun, Nov 30, 2008 at 3:33 PM, carlo latasa <cl...@gmail.com> wrote:

> 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
>



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