You can't. JSP runs on the server, Javascript (which is NOT Java) runs on the client. You might want to look into something like AJAX which will allow your javascript to make a complete connection to the server, receive data, and then update your page, which will make it look like you are doing what you are asking, but it takes longer than a true programmatic connection.
P.S. Don't come back and ask for more info concerning AJAX. That is another thing does not belong on this forum.
Reputation Points: 1471
Solved Threads: 490
Industrious Poster
Offline 4,043 posts
since Feb 2006