Index: trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlDocument.java
===================================================================
--- trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlDocument.java	(revision 1082)
+++ trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlDocument.java	(revision 1089)
@@ -45,4 +45,9 @@
     
     /**
+     * the hash code of this document
+     */
+    private int hashCode;
+    
+    /**
      * <p>
      * instantiates a new document element
@@ -74,4 +79,8 @@
             this.query = "?" + this.query;
         }
+        
+        this.hashCode = this.server.hashCode() + this.path.hashCode() +
+            (this.query != null ? this.query.hashCode() : 0) +
+            (this.title != null ? this.title.hashCode() : 0);
     }
 
@@ -138,6 +147,5 @@
     @Override
     public int hashCode() {
-        return server.hashCode() + path.hashCode() + (query != null ? query.hashCode() : 0) +
-            (title != null ? title.hashCode() : 0);
+        return hashCode;
     }
 
Index: trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorOutputWriter.java
===================================================================
--- trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorOutputWriter.java	(revision 1082)
+++ trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlMonitorOutputWriter.java	(revision 1089)
@@ -21,4 +21,6 @@
 import java.io.PrintWriter;
 import java.text.DecimalFormat;
+import java.util.HashSet;
+import java.util.Set;
 
 import de.ugoe.cs.util.StringTools;
@@ -62,5 +64,5 @@
 
     /**
-     * the is of the client of which all messages are logged through this writer
+     * the id of the client of which all messages are logged through this writer
      */
     private String clientId;
@@ -80,4 +82,10 @@
      */
     private long lastUpdate;
+    
+    /**
+     * the GUI elements, that were already logged and need therefore not be logged again into
+     * the same file
+     */
+    private Set<HtmlGUIElement> loggedGUIElements = new HashSet<HtmlGUIElement>();
 
     /**
@@ -215,26 +223,30 @@
      */
     private void dumpGuiStructure(HtmlGUIElement guiStructure) {
-        outputWriter.print("<component id=\"");
-        outputWriter.print(guiStructure.getId());
-        outputWriter.println("\">");
-        
-        if (guiStructure instanceof HtmlServer) {
-            dumpParam("host", ((HtmlServer) guiStructure).getName());
-            dumpParam("port", ((HtmlServer) guiStructure).getPort());
-        }
-        else if (guiStructure instanceof HtmlDocument) {
-            dumpParam("path", ((HtmlDocument) guiStructure).getPath());
-            dumpParam("query", ((HtmlDocument) guiStructure).getQuery());
-            dumpParam("title", ((HtmlDocument) guiStructure).getTitle());
-        }
-        else if (guiStructure instanceof HtmlPageElement) {
-            dumpParam("tagname", ((HtmlPageElement) guiStructure).getTagName());
-            dumpParam("htmlid", ((HtmlPageElement) guiStructure).getHtmlId());
-            dumpParam("index", ((HtmlPageElement) guiStructure).getIndex());
-        }
-        
-        dumpParam("parent", guiStructure.getParentId());
-        
-        outputWriter.println("</component>");
+        if (!loggedGUIElements.contains(guiStructure)) {
+            outputWriter.print("<component id=\"");
+            outputWriter.print(guiStructure.getId());
+            outputWriter.println("\">");
+        
+            if (guiStructure instanceof HtmlServer) {
+                dumpParam("host", ((HtmlServer) guiStructure).getName());
+                dumpParam("port", ((HtmlServer) guiStructure).getPort());
+            }
+            else if (guiStructure instanceof HtmlDocument) {
+                dumpParam("path", ((HtmlDocument) guiStructure).getPath());
+                dumpParam("query", ((HtmlDocument) guiStructure).getQuery());
+                dumpParam("title", ((HtmlDocument) guiStructure).getTitle());
+            }
+            else if (guiStructure instanceof HtmlPageElement) {
+                dumpParam("tagname", ((HtmlPageElement) guiStructure).getTagName());
+                dumpParam("htmlid", ((HtmlPageElement) guiStructure).getHtmlId());
+                dumpParam("index", ((HtmlPageElement) guiStructure).getIndex());
+            }
+            
+            dumpParam("parent", guiStructure.getParentId());
+        
+            outputWriter.println("</component>");
+        
+            loggedGUIElements.add(guiStructure);
+        }
         
         if (guiStructure.getChildren() != null) {
@@ -369,4 +381,6 @@
         outputWriter.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
         outputWriter.println("<session>");
+        
+        loggedGUIElements.clear();
     }
 
Index: trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlPageElement.java
===================================================================
--- trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlPageElement.java	(revision 1082)
+++ trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlPageElement.java	(revision 1089)
@@ -51,4 +51,9 @@
     
     /**
+     * the hash code of this document
+     */
+    private int hashCode;
+    
+    /**
      * <p>
      * instantiates a new element representing a tag in an HTML page
@@ -89,4 +94,9 @@
         this.htmlId = htmlId;
         this.index = index;
+        
+        this.hashCode = this.document.hashCode() + this.tagName.hashCode() +
+            (this.parent != null ? this.parent.hashCode() : 0) +
+            (this.htmlId != null ? this.htmlId.hashCode() : 0) +
+            (this.index != null ? this.index : 0);
     }
 
@@ -203,6 +213,5 @@
     @Override
     public int hashCode() {
-        return document.hashCode() + tagName.hashCode() + (parent != null ? parent.hashCode() : 0) +
-            (htmlId != null ? htmlId.hashCode() : 0) + (index != null ? index : 0);
+        return hashCode;
     }
 
Index: trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlServer.java
===================================================================
--- trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlServer.java	(revision 1082)
+++ trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlServer.java	(revision 1089)
@@ -35,4 +35,9 @@
     
     /**
+     * the hash code of this document
+     */
+    private int hashCode;
+    
+    /**
      * <p>
      * instantiates a new server element
@@ -57,4 +62,5 @@
         }
 
+        this.hashCode = this.name.hashCode() + this.port;
     }
 
@@ -113,5 +119,5 @@
     @Override
     public int hashCode() {
-        return name.hashCode() + port;
+        return hashCode;
     }
 
