[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index] [Home]

Re: image.jsp problem (WAS: Location of dependent classes...)


What is your default encoding?  Mine is "Cp1252".

You can find it with the following jsp code:

Your default encoding is "<%= System.getProperty("file.encoding") %>".
----
George

>From: Carsten Heyl <heyl@nads.de>
>Reply-To: Carsten Heyl <Heyl@nads.de>
>To: "George Burns" <george_burns@hotmail.com>
>CC: Heyl@nads.de, gnujsp@gjt.org
>Subject: Re: image.jsp problem (WAS: Location of dependent classes...)
>Date: Thu, 14 Oct 1999 22:03:12 +0200
>
> >When I run image.jsp, it runs, but the data I get back is not a valid 
>GIF.
> >It is 511 bytes, and starts out with the correct header, but it cannot be
> >displayed by any imaging software.
> >
> >I tried creating a new File and FileOutputStream, and created a new
> >GifEncoder that wrote to that FileOutputStream, and got a viewable image
> >(510 bytes).  It turns out that "out.print(bout.toString())" is filtering
> >the output stream.  If you think about it, it really should.  When you
> >convert something to a String, Java tries to make sure it is in the local
> >language characters.  It is changing many of the bytes to Hex 3A, which 
>is
> >"?".  It doesn't seem that there are any methods in JspWriterImpl to 
>output
> >straight data, since it always converts everything to a String or a char.
> >
> >How did you get this to work correctly?
>
>Don't know, it just works for me :-)
>I take a closer look what writing binary data to a Writer should mean.
>
> >----
> >George
>

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com