Forums Register Login

Problem sending a string as Http response

+Pie Number of slices to send: Send
Hello,
I have a problem where i tried to send the string form of xml data as a response to the front end which makes a http call to the servlet. But my front end recieves response as java.lang.NullPointerException.

Can anybody tell why this is happening.
I send string to front end with the following command:

where xx is the string of xml i.e "xml data....."
which means xx has been converted to string data.
but when i send some string like "blah,,,blah..."

it is recieved correctly as "blah..blah" in the front end.
Is this issue because of xml data present as string..
Any help is welcome

Thanks in advance

[ November 20, 2008: Message edited by: harsha galla ]
[ November 20, 2008: Message edited by: harsha galla ]
+Pie Number of slices to send: Send
Go to your server's logs and find out what line of code is throwing the NullPointerException (NPE).

If that doesn't make it clear what you need to do, post the relevant section of code, along with something that lets us know which line is throwing the NPE and we might be able to help you.
+Pie Number of slices to send: Send
I am guessing that in the line:

pw.print(xx);

xx is in fact a null reference. How are you checking that it is not?

Bill
I carry this gun in case a vending machine doesn't give me my fritos. This gun and this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1608 times.
Similar Threads
escape char cuts parameter in http post
mocking InitialContext class???
using ajax for http get
Putting string in soap message
Problem with Http Get in Ajax
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 08:36:10.