I have this code
<%=out.write("<input
type=\"hidden\"
id=\"tid\"
value=\""+request.getParameter("id").toString()+"
\"/>")%>
<script type="text/javascript">
getPage(document.getElementById("tid").value)
</script>
This code creates a hidden field with the value came from
<site root>/viewPage.jsp?id=erwdf
url and pass the value of this hidden field to a jsp function. When I ran this code on Tomcat it gave an error as
The method print(boolean) in the type JspWriter is not applicable for the arguments (void)
on JSP code line I given above. So am I doing anything wrong or is there any alternative method to pass a GET parameter to a JavaScript function? I don't know much about Javascript just started to learn it.