You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rajagopal V <ja...@yahoo.com> on 2002/02/26 18:41:25 UTC

RE: Design Issue: XML/XSL/JSP

Im redesigning my JSP which does all SQL +
presentation. I have a main report which has 4 sub
reports which have to be created in HTML and PDF. So
what i do now is create a XML out of the SQL and then
use appropriate stylesheets. All this gets done in the
JSP(Now!!).

Now, if i have to use Struts, Im thinking of having
Action subclasses for each of the 4 reports, create
XML in each of them and add the Document object to
some collection that can be retrieved in the JSP. 

In the JSP, I can fetch the collection and use taglibs
to associate this with a stylesheet and print out the
results. Is this an acceptable design? 

I had a look at some of the postings here about
creating XMLServlet before control goes back to the
JSP but I have some text that has to be displayed
other than the results. 

Is there any flaw in this design.

TIA
Raj

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Design Issue: XML/XSL/JSP

Posted by Jeff Pennal <je...@openroad.ca>.
I wrote an extenstion to struts, called stxx 
(http://www.openroad.ca/opencode/), which allows you to forward an XML 
document, generated in an Action, to an XSL file, as opposed to a JSP. 
This may be an option for you.

In this case, you would have an action that generates the XML (from a 
database, some other source, etc). The stxx code allows you to define an 
XSL file(s) in your struts-config.xml file that would be used to 
transform the XML into some HTML output.

Let me know if this is of any help to you,
Jeff

Rajagopal V wrote:
> Im redesigning my JSP which does all SQL +
> presentation. I have a main report which has 4 sub
> reports which have to be created in HTML and PDF. So
> what i do now is create a XML out of the SQL and then
> use appropriate stylesheets. All this gets done in the
> JSP(Now!!).
> 
> Now, if i have to use Struts, Im thinking of having
> Action subclasses for each of the 4 reports, create
> XML in each of them and add the Document object to
> some collection that can be retrieved in the JSP. 
> 
> In the JSP, I can fetch the collection and use taglibs
> to associate this with a stylesheet and print out the
> results. Is this an acceptable design? 
> 
> I had a look at some of the postings here about
> creating XMLServlet before control goes back to the
> JSP but I have some text that has to be displayed
> other than the results. 
> 
> Is there any flaw in this design.
> 
> TIA
> Raj
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


-- 
Jeff Pennal                         p:604-694-0554(x107)
Senior Software Developer           f:604-694-0558
Openroad Communications             e:jeffp@openroad.ca
Vancouver, BC


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>