重複の可能性:
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>
<%}%>
この種のコードを持つことは可能ですか?代替手段はありますか?