hi chris this is steve Burrus and the line of code in question is the
while loop : "while( ( r = in.read(by)) != -1) {" the server error for a
long time has always pointed to that line of code creating the NPE.
Christopher Schultz wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Steve,
>
>Steve R Burrus wrote:
>
>
>>here is the entire code for the image servlet which I seem to be
>>repeatedly getting that NullPointerException java exception. Any ideas
>>what the problem is ? :
>>
>>
>
>What line of code does the NPE show? Please give us the line of code and
>not just the line number.
>
>I'm guessing that your JPG file is not being found, so
>sc.getResourceAsStream is returning null.
>
>Correct me if I'm wrong, but this generally checks for null:
>
>if(null == in)
> // handle the null condition
>
>Is there something that I'm not getting??!
>
>- -chris
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.4.5 (MingW32)
>Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
>iD8DBQFFV/3J9CaO5/Lv0PARAvNeAKCNQ3JQLLnVBYGrz9qKLaFRA0jGvACgu+CM
>ps01WACr5sV+hluXp2s4mgU=
>=SfP5
>-----END PGP SIGNATURE-----
>
>---------------------------------------------------------------------
>To start a new topic, e-mail: users@(protected)
>To unsubscribe, e-mail: users-unsubscribe@(protected)
>For additional commands, e-mail: users-help@(protected)
>
>
>
>
>