Hi I am reviewing the source code of the DefaultServlet. I do not understand the following:
// slightly modified from source of "serveResource". ServletOutputStream ostream = null; PrintWriter writer = null; try { ostream = response.getOutputStream(); } catch (IllegalStateException e) { if ( contentType == null || contentType.startsWith( "text" ) ) writer = response.getWriter(); else throw e; } } Why would getOutputStream() fail? And if that fails, why would getWriter() succeed? Text data is also binary data, right? I would understand that the other way around... Regards, Steffen
smime.p7s
Description: S/MIME cryptographic signature