可能性の重複:コードのこの種を持っている
How to use scriptlet inside javascriptJavascriptとスクリプトレット:できますか?
<%
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>
<%}%>
ことは可能ですか?何か別の選択肢はありますか?
スクリプトレットのいくつかの[Tag Library](http://java.sun.com/products/jsp/tutorial/TagLibrariesTOC.html)insteddを使用すると可能です。 –
スクリプレット条件でJavaスクリプトを定義することは可能です。 –