I have three types of get requests that are delivered to a class file on web application from a mobile device. Because the mobile device provides no cookies, the log file hit only has
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 can instantiate javascript in my class file, and generate a javascript function call to urchinTracker() from inside the class file, I can replace that useless cookieArrayLength=0; with some useful data urchin can read from the log file into analytics reports. We have been looking at scripting in Java with Rhino; Safari Bookshelf has:
Scripting in JavaTM: Languages, Frameworks, and Patterns
which helped us immediately demo that we can run javascript in class files --this works out-of-the-box on Java 6.
Anyone know any resources for scripting with Rhino on Java 1.5 or 1.4?
Alternately, any suggestions for running javascript from java 1.5 would be appreciated.