以下のような複合コントロールがあります。
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:composite="http://java.sun.com/jsf/composite" xmlns:h="http://java.sun .com/jsf/html">
<composite:interface>
<composite:attribute name="validatorId"/>
<composite:attribute name="message"/>
</composite:interface>
<composite:implementation>
<div>
<script type="text/javascript">
function #{cc.attrs.validatorId}(){alert('why is it not working :(');};
</script>
<div style="background-color: #F2DEDE;color: #b94a48;border-style: solid;border-color: #FAC3CB;border-width: 1.8px;font-family: Arial;
font-size: 12px;height:17px;vertical-align: middle;padding-left: 8px;padding-right: 8px;padding-top: 2px;display: none;"
id="#{cc.attrs.validatorId}">
#{cc.attrs.message}
<img src="images/close-mini.png" style="cursor: pointer;padding-left: 5px;"/>
</div>
</div>
</composite:implementation> </html>
このコントロールは、xhtml ファイルに配置されます。javascript および複合コントロールは、期待どおりにレンダリングされます。ただし、xhtml に対してリクエストが行われると、Glassfish サーバーで次の例外が発生します。
java.lang.IllegalStateException: PWC3999: 応答がコミットされた後にセッションを作成できません。
その理由は何ですか?JavaScript関数の例外を削除しても発生しません。