You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Sathish Jayapal <sj...@gmail.com> on 2009/02/04 14:26:03 UTC

Velocity - Struts- XML

I have an application that uses struts actions rendering some  
information and template's body content is from a XML file. I'm not  
sure how to go about merging XML information along with struts  
actionform. I tried various examples to get some information.

  I was able to velocity working for populating information from  
actionform. But am not sure of to integrate or merge XML data to the  
same JSP. I tried different options, I tried to use VelocityContext,  
and put my parsed XML into that context, send that to be rendered, but  
I was getting the famous Resource Exception. I tried to use parse XML  
data put into action's request, velocity throws an exception.

Can anybody help me to understand how to merge data from struts action  
and XML content??


Thanks!!

Re: Velocity - Struts- XML

Posted by Nathan Bubna <nb...@gmail.com>.
VelocityTools 2 has an XmlTool.  Even if that doesn't fit your
particular need, the source code for it shows how to load an xml file
into a dom object and use the data that way.

On Wed, Feb 4, 2009 at 5:26 AM, Sathish Jayapal <sj...@gmail.com> wrote:
> I have an application that uses struts actions rendering some information
> and template's body content is from a XML file. I'm not sure how to go about
> merging XML information along with struts actionform. I tried various
> examples to get some information.
>
>  I was able to velocity working for populating information from actionform.
> But am not sure of to integrate or merge XML data to the same JSP. I tried
> different options, I tried to use VelocityContext, and put my parsed XML
> into that context, send that to be rendered, but I was getting the famous
> Resource Exception. I tried to use parse XML data put into action's request,
> velocity throws an exception.
>
> Can anybody help me to understand how to merge data from struts action and
> XML content??
>
>
> Thanks!!

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