I have this cezar.jsp file and the following code inside my head below. 
I have a textarea and I want to pass the value as a parameter for a java function.
<head>
    <%@ page import="cpd.CezarBun" %>
    <script>
    <%
        cpd.CezarBun cezar = new cpd.CezarBun();
        //don`t know how to use scripplets here
        String contentIn = document.getElementById('myTextArea').value; 
        cezar.criptare(contentIn); //takes a String parameter
    %>
    </scrupt>
</head>
 
     
     
    