Do you have a public getDoc() method on your action? John
> -----Original Message----- > From: Eric Hamacher [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 01, 2008 3:31 PM > To: Struts Users Mailing List > Subject: XSLTResult problem > > Struts 2.0.11 > > > > Hello: > > > > > > > > It appears that XSLTResult is having trouble transforming a simple > Document: > > > > <?xml version="1.0" ?> > > <buidInfo> > > <buid>999999</buid> > > <buid>9999x99</buid> > > </buidInfo> > > > > > > My action is producing valid XML. I don't think it's the > action causing > the problem. The error message printed on the screen: > > > > XML Parsing Error: no element found > > Location: > http://111.222.33.444:8989/ImageManager/download/BUDropdownAja > xAction.ac > tion?schema=XXXXX > > Line Number 1, Column 1: > > > > > > Here is the action execute method which creates the Document: > > > > public String execute() throws ParserConfigurationException { > > ImageManagerProperties props = new > ImageManagerProperties(); > > props.load(); > > > > DocumentBuilderFactory dbfac = > > DocumentBuilderFactory.newInstance(); > > DocumentBuilder docBuilder = dbfac.newDocumentBuilder(); > > doc = docBuilder.newDocument(); > > > > Element root = doc.createElement("buidInfo"); > > doc.appendChild(root); > > > > File directory = new > File(props.getBaseDownloadDir() + "/" + > schema); > > File[] buids = directory.listFiles(); > > for (File f: buids) { > > if (f.isDirectory()) { > > Element buid = doc.createElement("buid"); > > Text name = doc.createTextNode(f.getName()); > > buid.appendChild(name); > > root.appendChild(buid); > > } > > } > > > > return SUCCESS; > > } > > > > The configuration is as such: > > > > <action name="BUDropdownAjaxAction" > class="download.BUDropdownAjaxAction"> > > <result type="xslt"> > > <param name="exposedValue">doc</param> > > </result> > > </action> > > > > I assume that XSLTResult is available through the struts default > settings. > > > > Can anybody see something obvious? > > > > Regards, > > Eric Hamacher > > > > ****************************** > > THIS EMAIL IS INTENDED ONLY FOR THE REVIEW OF THE > ADDRESSEE(S), AND MAY > CONTAIN CONFIDENTIAL AND LEGALLY PRIVILEGED INFORMATION. INTERCEPTION, > COPYING, DISSEMINATION, OR OTHER USE BY OTHER THAN THE ADDRESSEE(S) IS > PROHIBITED AND MAY BE PENALIZED UNDER APPLICABLE PRIVACY LAWS. IF YOU > RECEIVED THIS EMAIL IN ERROR, PLEASE DELETE IT AND NOTIFY ME BY RETURN > EMAIL TO [EMAIL PROTECTED] ******************************* > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]