You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jim Reynolds <ji...@gmail.com> on 2007/02/15 21:26:21 UTC

S2 Seeking Suggestion for XML/Dom

I am implementing a "treeview" type of page to display categories in a
"treeview" type manner. The implementation requires a XML file
displayed in the browser. So my idea would be to use the action to
create a dom, then put the dom into the request and have a JSP page
pull the dom from the request and print it to the screen. Not sure
about content-type on jsp page.

That is how I was planning to implement it. But I am not sure if that
is the cleanest way to handle it these days and put the creation into
a action. If anyone has incorporated this type of technique in S2 and
have any suggestions, I would appreciate input.

Regards,

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


Re: S2 Seeking Suggestion for XML/Dom

Posted by Simons Kevin <fb...@skynet.be>.
You could create the XML document by using SAX.
And read it with JDOM.
In the EE architecture you also have more abstract classes where SAX and 
JDOM are derived from.

Content type would be as normal since your Java class generates the 
output...
I suppose that would be the most convenient way but you would have a mixture 
within your MVC model since your Java class is generating a "view".

You could however create a method hasnext en getnext...
Then you could use an iterator in your JSP who calls those methods...

Hope this helps.
----- Original Message ----- 
From: "Ian Roughley" <ia...@fdar.com>
To: <us...@struts.apache.org>
Sent: Friday, February 16, 2007 12:42 AM
Subject: Re: S2 Seeking Suggestion for XML/Dom


> There should be a XSLT result type - using this result you can return  an 
> XML document from an action.  Is this what you are looking for?
>
> /Ian
>
>
> Quoting Jim Reynolds <ji...@gmail.com>:
>
>> I am implementing a "treeview" type of page to display categories in a
>> "treeview" type manner. The implementation requires a XML file
>> displayed in the browser. So my idea would be to use the action to
>> create a dom, then put the dom into the request and have a JSP page
>> pull the dom from the request and print it to the screen. Not sure
>> about content-type on jsp page.
>>
>> That is how I was planning to implement it. But I am not sure if that
>> is the cleanest way to handle it these days and put the creation into
>> a action. If anyone has incorporated this type of technique in S2 and
>> have any suggestions, I would appreciate input.
>>
>> Regards,
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.441 / Virus Database: 268.18.0/689 - Release Date: 15/02/2007 
> 17:40
> 


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


Re: S2 Seeking Suggestion for XML/Dom

Posted by Ian Roughley <ia...@fdar.com>.
There should be a XSLT result type - using this result you can return  
an XML document from an action.  Is this what you are looking for?

/Ian


Quoting Jim Reynolds <ji...@gmail.com>:

> I am implementing a "treeview" type of page to display categories in a
> "treeview" type manner. The implementation requires a XML file
> displayed in the browser. So my idea would be to use the action to
> create a dom, then put the dom into the request and have a JSP page
> pull the dom from the request and print it to the screen. Not sure
> about content-type on jsp page.
>
> That is how I was planning to implement it. But I am not sure if that
> is the cleanest way to handle it these days and put the creation into
> a action. If anyone has incorporated this type of technique in S2 and
> have any suggestions, I would appreciate input.
>
> Regards,
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org



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