Hi, i have this problem of i am able to edit the xml file but when i try to
link it up with a piechart using amchart, the data shown is that of the
previous data before the update. It is only when i open up the xml file to
refresh it that it is able to show the new data.
Tried setting cachingAllowed to false and reloadable to true but the problem
still exisit. Tried to add a parameter to the output file like this String
outputFile = "../Googlipse/twitter.mining/WebContent/Pie.xml?" + new Date(); 
but there is error.
Please help. Thanks a lot!! Really desperate

My code is as below

String inputFile = "../Googlipse/twitter.mining/WebContent/Pie.xml";
         String outputFile = "../Googlipse/twitter.mining/WebContent/Pie.xml";
                        
                        Document doc =
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new
InputSource(inputFile));
                                XPath xpath = 
XPathFactory.newInstance().newXPath();
                        NodeList nodes =
(NodeList)xpath.evaluate("//sli...@title='Positive']", doc,
XPathConstants.NODESET);
             
                
                        for (int idx = 0; idx < nodes.getLength(); idx++) {
                                nodes.item(idx).setTextContent("6");
                        }
             
                        
                        Transformer xformer =
TransformerFactory.newInstance().newTransformer();
                        xformer.transform(new DOMSource(doc), new 
StreamResult(new
File(outputFile))); 
                        

Retrieving the xml file:

        <script type="text/javascript">
                // <![CDATA[    
        
                var so = new SWFObject("ampie.swf", "ampie", "360", "300", "8",
"#FFFFFF");
                
                so.addVariable("settings_file",
encodeURIComponent("ampie_settings1.xml"));
                so.addVariable("data_file", encodeURIComponent("Pie.xml"));
                so.write("flashcontent");
                // ]]>
        </script>
-- 
View this message in context: 
http://old.nabble.com/tomcat-caching-tp26280018p26280018.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to