File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes How to use XSLT having struts tags in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to use XSLT having struts tags in Struts" Watch "How to use XSLT having struts tags in Struts" New topic
Author

How to use XSLT having struts tags in Struts

Tarun Chatterjee
Greenhorn

Joined: Mar 07, 2005
Posts: 25
I have a XSLT and i am using Struts Tag in the XSL(To ensure that after the Page is rendered and the user enters the data we get the data in our form beans).
When i use a Transformer and create a JSP/HTML out of it and render that using Struts. I do not face any issues.

When i write the Transformer directly to Output Stream , then the Struts tags are not rendered.

For example if i write

transformer.transform(new StreamSource(new File(path+"/POC/jsp/index.xml")),
new StreamResult( new File(path+"/POC/jsp/index.jsp")));

This works perfectly fine.

when i do
transformer.transform(new StreamSource(new File(path+"/POC/jsp/index.xml")),
new StreamResult( response.getOutputStream()));

The widgets having struts tags are not shown in the UI.
I tried using Model2X using a servlet but no luck as well

Can anyone help me please.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to use XSLT having struts tags in Struts
 
Similar Threads
Question on Java Application Design
Passing Parameters to XSLT ?
Facing org .apache .xml. dtm. DTMException Not supported
xml/xslt/jsp Usage patterns...?
Java XML parser to parse the XML file