Possible Duplicate:
How to use scriptlet inside javascript
<%
if(request.getAttribute("exception")!=null){%>
<script type="text/javascript" >
    alert("hi");
    parent.error.document.open();
    parent.error.document.write("bye");
    parent.error.document.write(<%=request.getAttribute("exception").toString()%>);
    parent.error.document.close();
</script>
</form>
<%}%>
Is it possible to have this sort of code? Is there any alternative?
 
     
     
    