I receive three different types of GET requests from a mobile device to a class file on my web application. Since the mobile device does not provide any cookies, the log file only captures:
in.ter.nal.ip ser.ver.i.p:port 2009-06-05 09:14:44 GET /applicationname/mobiledevicexml reqtype=login&userid=xx### 200 87 - MercuryMobile/1.0 CFNetwork/342.1 Darwin/9.4.1 cookieArrayLength=0;
If I am able to initiate javascript within my class file and create a javascript function call to urchinTracker() from within it, I can replace the redundant cookieArrayLength=0; with some valuable data that can be read by urchin for analytics reports based on the log file. We have been exploring scripting in Java with Rhino; Safari Bookshelf includes:
Scripting in JavaTM: Languages, Frameworks, and Patterns
which has allowed us to demonstrate that we can execute JavaScript within class files -- this functionality is readily available on Java 6.
Does anyone know of any resources for scripting with Rhino on Java 1.5 or 1.4?
Alternatively, any tips on running JavaScript using Java 1.5 would be greatly appreciated.