Are you talking about the server side, writing Javascript from inside a JSP or the client side where Javascript actually executes? If you mean the server side - I suggest that you start with a mock-up plain HTML page containing Javascript that does what you want, then figure out how to get JSP to write that HTML. Bill
You can have Java variables passing values into Javascript but not other way round.
No, you can't. They cannot inter-operate in any fashion. But as I stated, Java can be used to generate the Javascript that will eventually be sent to the client. That is not at all the same as "passing Java variables into Javascipt".