Hello Sergio Degioia and all! sli> Don't make a JSP that build the XML, while treat your JSP as a simple sli> XML file, then delegate to the XSL file making the JSP. sli> To be clearer: sli> Make a JSP that receives the request sli> then call from it the servlet (or jsp) that invokes sli> Transformer.transform() whose source is just such an XML file: sli> ... sli> Your data.xsl will have to be changed to include sli> at the head: sli> <%@ page contentType="text/xml" %>
Guys, you have gone crazy! Generate .jsp on the fly and then compile it on every request?! It will take _plenty_ of time and pollute you webapp directory. It won't work on Weblogic, maybe other servers that do not unpack .war files!! What you should do: - go servlet based completely: form you xml without a jsp and call the transformation - all in the servlet. - use a xsl taglib There are plenty of xsl taglibs. I do not know if Struts has one maybe it has. Then jakarta-taglibs contains - some 'old' xsl taglib (it was written more for educational purposes) not maintained - some xtags taglib (haven't tried it) - standard taglib (that is what they have a prototype of the future jtmpl (or jstmpl or jsptmpl) -that is standard java taglibrary. They say it has tags for xml. - some chap has bombed the jakarta-taglibs maillist recently saying that everyone can use his taglib. He says it is very cool and fast. The lib is at http://crazybob.org/xsl.zip They want to wipe the 'old' xst taglib at jakarta-taglibs and replace it with this one. The discussion has got plenty of +1's for it. So maybe it is really the best one. Do not know BTW: you must be aware that xsl transformations may be _very_ slow! They can easealy bring your server to its knees (that's what happened in my own practice with Cocoon1). That is why the crazybob taglib takes great effort to cache the transformers whenever possible and even cache the results of transformations (you should do it somehow explicitly). This caching may improve the situation. If you do not take any special measures like this -- the transformations may happen to be a _VERY_ costly operation, very resouce and memory consuming. Last but not least: maybe we should hold this discussion in JSP-INTEREST, not SERVLET. Question on the taglibs under jakarata-taglibs (and on crazybob's i guess) may be asked on [EMAIL PROTECTED] or somewhere nearby (see the jakarta.apache.org site) Best regards, Anthony ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
