Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

154
Views
XML Parsing Error in Firefox developer console

I have a jquery scripts which sends data to a java servlet and updates the content of the page basing on the servlet response. Everything works (the page gets updated with the values as I was expecting), but I can see in the developer console in firefox the following error:

XML Parsing Error: syntax error Location: http://localhost:8080/servlet_url Line Number 1, Column 1

This is my jQuery code:

 <script src="http://code.jquery.com/jquery-1.10.2.js" type="text/javascript"></script>
 <script type="text/javascript">
 $(document).ready(function() {
 $.post('servlet', {
 filepath : '${file}'},
 function(responseText){
 $('#div_id').text(responseText);
 });
 });
 </script>
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

It seems that the issue occurred because I forgot to set the response content type in the servlet. So basically this line of code:

 response.setContentType("text/plain"); 

solved the problem.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!