scone.accesstracking2
Class JavaScriptAdder

java.lang.Object
  extended by HttpEditor
      extended by scone.proxy.HtmlTokenEditor
          extended by scone.accesstracking2.JavaScriptAdder

public class JavaScriptAdder
extends HtmlTokenEditor

Adds line in header to get JavaScript code from AccessTrackingMeg, which tracks user actions.

The following Code is inserted if the page ist not the head of a frameset:
<SCRIPT Language='JavaScript1.2' SRC='http://tracking.scone.de/_id123'></SCRIPT> where 123 is the nodeId

In case of a frameset a special piece of JavaScript code is inserted instead. This piece tests if the window already has a name. If not, a name is generated. That is necessary if a browser window starts with a frameset.
The following Code is inserted in case of a frameset:
<SCRIPT type='text/javascript'>
<!--
if (!window.name) { window.name = 'SCONE'+_scone_start_time+Math.floor(Math.random()*10000)};
//-->
</SCRIPT>

Author:
Harald Weinreich, Volkert Buchmann, Torsten Hass

Field Summary
static java.lang.String COPYRIGHT
           
 
Fields inherited from class scone.proxy.HtmlTokenEditor
e
 
Constructor Summary
JavaScriptAdder()
           
 
Method Summary
 void handleRequest(SconePipe pipe)
          tries to add the preamble: before </head>-Tag before <body>-Tag before <frameset>-Tag before heading before table before link (<A> or <AREA>-Tag before image before form before preformatted text In case of a frameset a special JavaScript code is added to generate a window name if the window has none.
 
Methods inherited from class scone.proxy.HtmlTokenEditor
setResponseHeaderField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT
See Also:
Constant Field Values
Constructor Detail

JavaScriptAdder

public JavaScriptAdder()
Method Detail

handleRequest

public void handleRequest(SconePipe pipe)
tries to add the preamble:
  1. before </head>-Tag
  2. before <body>-Tag
  3. before <frameset>-Tag
  4. before heading
  5. before table
  6. before link (<A> or <AREA>-Tag
  7. before image
  8. before form
  9. before preformatted text
In case of a frameset a special JavaScript code is added to generate a window name if the window has none.

Overrides:
handleRequest in class HtmlTokenEditor