[jdom-interest] Help¡¡¡ Please¡¡¡¡ Strange problem with JSP/XML/Java saving XML files¡¡¡

Pedro ppalomo at hotpop.com
Fri Jan 18 04:22:54 PST 2002


Hi friends of XML¡¡

I have a problem in my application. I use a javabean to merge,copy,save xml files....and the problem is :

    I have a JSP page that uses this javabean and create/save an xml file correctly, but the same java code and the same javabean in a separate Java application(stand alone JAVA application) don't saves/writes the file correctly. When i try to open the xml file with Internet explorer gives me an error because the file is cutted. And it's strange that if I send the file to the System.out the file seemingly correctly and complete.

    What can be my problem??

The code of the function that writes/saves the xml file is ......

public boolean SaveXML(String file,Document doc) throws IOException{
  
         FileWriter writer = new FileWriter(file);
         XMLOutputter outputter = new XMLOutputter(" ",true);
         
        //  outputter.output(doc, System.out);  In the java program shows correctly the file in the Dos Window
        
        outputter.output(doc, writer); 
        // In JSP run OK and create the file and in Java application cut the file but 
        // don't throws an exception
                          
         return true;
     
  }

 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20020118/05b86d99/attachment.htm


More information about the jdom-interest mailing list