Hi Chris, Declaring a variable in <jsp:declaration> makes the variable a static class variable. Declare the variable in <jsp:scriptlet>
Ralf -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 21. März 2007 12:37 An: [email protected] Betreff: [magnolia-user] How to clear the memory once a scriptlet has been run?? Hi, I've written this code which takes a specified starting page, and iterates around every subpage, printing out the contents. I'm slightly confused however. It is necessary to have the line text=""; (near the very end) Otherwise every time you refresh the page, the variable text appends another copy of itself onto the end of the string. How do you stop this happening (other than setting it = "" at the end) i.e. how do you clear everything from memory once the scriptlet has been processed? I've tried adding this.destroy() at the end but this has no effect. (admittedly I could just be happy with the effect of text=""; but I am finding similar problems in other code I'm writing i.e. it works fine the first time you run it, but the following times the variables are clearly still stored in memory, again resulting in undesirable behaviour). Cheers for any help, Chris ---------------------------------------------------------------- for list details see http://www.magnolia.info/en/developer.html ----------------------------------------------------------------
