When the above property is included in the String object I get a runtime error in my receiving servlet at the line
The error being reported is
28/06/2009 12:18:24 org.apache.tomcat.util.http.Parameters processParameters
WARNING: Parameters: Character decoding failed. Parameter skipped.
The process work well with all other properties (even with Hex color values), so I am suspecting it is something with the percentage % sign in the String in the payload.
Would anybody be able to provide me with a clue on what the problem maybe, and where I need to look to find a solution?
It's not Ajax that's tripping you up, but your misuse of HTTP.
You say that the POST is of type "application/x-www-form-urlencoded", then pass XML rather than form encoding. And then you expect getParameter to be able to do something with the XML? Of course, it's going to foul up.
You need to properly format and encode the POST body.
great, this XMLHttp thing is making more sense now - but I am now not able to access the payload on the server.
I set the header as
but how do I set up the payload on the client? and how do I get access to the payload from request object on the server?
I have tried googling, looking through my inadequate books and playing around with xhtmlPayload= "Payload=" + createXml() on the client with request.getParameter("Payload") on the server without luck, or do I use the request.getInputStream().
I am not coming to this as a programmer but from an idea that I am trying to work through, so I am learning coding as I go along. I have used two frameworks in my journey, Struts for server-side and Dojo for the client-side, and I ended up finding both restrictive. So my experience has been that learning frameworks takes up learning time, and tends to lead to dead ends. So I am avoiding them for now.
While I now find JQuery interesting, I have basically completed my client-side stuff, and am now moving back to doing the Java stuff on the server side.
Perhaps I can use frameworks when I refactor later when my idea is settled and I can afford to employ people to refactor my code. But until then...