how to share a variable from java code with some javascript functions
I have a scenario where I have to invoke some functions using XML RPC. As my web app is on Google App Engine and the Apache XML RPC Library for Java is not fully supported by App Engine, I thought that I should store the login/access credentials with the help of java code, and then the javascript code should pick up those credentials (maybe as session variables??) and invoke the necessary calls and obtain data.

Is the above scenario doable? How do I share a variable, ideally as a session variable, between java and javascript code? 
how to share a variable from java code with some javascript functions
===

I have a scenario where I have to invoke some functions using XML RPC. As my web app is on Google App Engine and the Apache XML RPC Library for Java is not fully supported by App Engine, I thought that I should store the login/access credentials with the help of java code, and then the javascript code should pick up those credentials (maybe as session variables??) and invoke the necessary calls and obtain data.

Is the above scenario doable? How do I share a variable, ideally as a session variable, between java and javascript code? 