You can't send an object reference, period. You can send the object value, which, for an immutable object like a string, amounts to just about the same thing.
If for some reason you absolutely, positively, have to transfer objects instead of their values, you'll need to use serialization between the applet and the
servlet, at which point JavaScript can't help you.
If something does make it into your applet and gets assigned to "o", but causes a NullPointerException, the question is: Does the assignment work at all? What does the JavaScript code look like that gets generated?
Also, you should not call Applet.start directly. It gets called automatically by the browser/JVM.