On Wed, Oct 06, 1999 at 06:08:08PM +1000, Mark Foley wrote:
> Hi All!
>
> I am experiencing cunfusing behaviour when returning Strings from a JNI
> function to be displayed using a ServletOutputStream.  The JNI function is
> in turn getting the strings from a third party DLL.
>
> When I run the servlet as an application, System.out.println() displays the
> output Strings as expected, but from the servlet they are all wrong.  Some
> are meaningless characters, others are simply the wrong strings from the
> files being accessed.
>
> Has anybody seen this before, and solved it?
>
> Thanks,
> Mark Foley
> EDS (Australia)
> [EMAIL PROTECTED]

Mark,

I have seen this behavior from ServletOutputStream when my strings
were terminated by a null character, '\0'.  Try removing the nulls
from your strings and try it again.  Note: I had no problem printing
the strings, with the nulls using System.out.println();

                                    --M.B.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to