“Premature end of file” error when Java read and writes XML data files

前端 未结 4 1986
余生分开走
余生分开走 2020-12-17 00:36

I have been using JDOM library to read and write XML files through Java Servlets.

Problem is that when I send many requests using AJAX to my servlets which read and

4条回答
  •  囚心锁ツ
    2020-12-17 00:50

    I have faced such type of problem but exactly not the same. I am sharing my experience about this error. Please, sorry for any inconvenience.

    I have faced the following problem

    1. I have to form a xml file with dynamic variable data. And post that xml to a URL by PostMethod in java.

    2. Normally It works. But when dynamic variable data is null. Then it shows the “Premature end of file".

    Solution:

    1. Just checking the variable is null or not. And it works for me.

提交回复
热议问题