Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
getOutputStreamが応答に対して呼び出されたかどうかを確認する方法はありますか?
1つの方法はServletFilter、サーブレットリクエストをインターセプトし、デコレータを使用してHttpServletResponseをラップすることです。HttpServletResponseのresponse.getOutputStream()は、メソッドが呼び出されたことを通知し、ラップに呼び出しを委任しHttpServletResponseて実際の出力ストリームを返します。
ServletFilter
HttpServletResponse