The object is on the server and only exists while the JSP is used to create the HTML page that is sent to the browser. You can see what's being sent to the browser, where JavaScript is evaluated, by doing a View Source.
In other words. the question "how can I pass a Java object to a JavaScript function?" is completely impossible. Please read
this article to understand what JSP is and how it operates.
If you need the full object on the client, you'll need to recreate it by using the JSP to create the JavaScript markup that recreates the data for the object. The original object itself cannot be "passed" to the client.