I am trying to call jsp code in javascript.
The error is as follow
org.apache.jasper.JasperException: Unable to compile class for JSP:
     An error occurred at line: 16 in the jsp file: /testng_index.jsp
     String cannot be resolved
     13:            var mai=document.getElementById("j");
     14:            //mai.value = mai.value.toUpperCase();
     15:            var m=mai.value;
     16:            <%=String value=document.writeln(m)%>
     17:            var mo= <%=  new  PlaneBo().getOwnerId(value)%>;
     18: //             document.writeln(mo);
     19:            if(mo==0)
here is the code
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1" import="com.ams.services.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"       
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<script type="text/javascript" language="javascript">
    function emailCheck()
    { 
        var mai=document.getElementById("j");
        //mai.value = mai.value.toUpperCase();
        var m=mai.value;
        <%=String value=document.writeln(m)%>
        var mo= <%=  new  PlaneBo().getOwnerId(value)%>;
//          document.writeln(mo);
        if(mo==0)
            {
//                  document.writeln(m);
                 var tab = document.getElementById("t");
                var row = tab.insertRow(3);
                var cell1=row.insertCell(0);
                var cell2=row.insertCell(1);
                var inpt= document.createElement("input");        
                inpt.setAttribute("name","jho");
                inpt.setAttribute("type","text");
                cell1.innerHTML="Name";
Please provide me suitable solution of this problem.
 
     
    