-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Kimberly,
Kimberly Begley wrote: | I was hoping to use the jsp:include tag to include the snippet (no html or | body tags) - I tried with the same code that Chris sent to open a jpeg - | thinking it might be the same solution for the html but have gotten an | internal error at the jsp include line. The problem is that JSPs use HttpServletResponse.getWriter (because JSPs are used to produce text output) while the servlet you write uses HttpServletRequest.getOutputStream. The two are incompatible for the same request, and getWriter has already been called, to getOutputStream fails. You have a couple of options: * Write another version of OpenFile called OpenTextFile or whatever * Modify OpenFile to try getOutputStream first, then getWriter * Put a special flag in the request, and have OpenFile detect that flag ~ to determine whether getWriter or getOutputStream should be called If you want to use Writers instead of Streams, you should probably open your file using a Reader instead of a Stream as well. Hope that helps, - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkfw8D4ACgkQ9CaO5/Lv0PCzxwCfYMDYRCHCjLxo5bCmq+wiuvMG 0JAAn3+hBtaGqJx6Oucn/ufDBos+G6bi =pp7j -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]