when i click to submit the form, i got java.lang.IllegalStateException. I search the web and found that wes because the wrong use of response.getOutputStream(); and response.getWriter(); Is this a bug? how to fix this?
In my java code: StreamResponse onSuccess() { return new TextStreamResponse("text/json", "{key:'"+test+"'}"); } In my page .tml: <t:form t:id="testForm"> <table> <tr> <td> test </td> <td> <t:textField t:id="test" value="test"> </t:textField> </td> <td> <a href="#" onclick="processForm();">submit</a> </td> </tr> </table> </t:form> <script> var processForm = function(){ alert('click'); ele = jQuery('#testForm'); var options = { dataType: 'json', success: function(data){ alert(data.key); } }; ele.ajaxSubmit(options); }; </script> -- Yet Another Java EE Developer!