Skip to content
Advertisement

White spaces are required between publicId and systemId

I am trying to make a ajax call to other domain locally from my computer by writing some proxy code in jsp. And this is my jQuery AJAX code that is calling proxy.jsp page.

JavaScript

And my JSP file is:-

JavaScript

And When I check the response, I am getting this error for the XML file it is parsing:

JavaScript

And the XMl file is this:-

JavaScript

What wrong I am doing here.. Any suggestions will be appreciated..

Advertisement

Answer

The error message is actually correct if not obvious. It says that your DOCTYPE must have a SYSTEM identifier. I assume yours only has a public identifier.

You’ll get the error with (for instance):

JavaScript

You won’t with:

JavaScript

Notice "" at the end in the second one — that’s the system identifier. The error message is confusing: it should say that you need a system identifier, not that you need a space between the publicId and the (non-existent) systemId.

By the way, an empty system identifier might not be ideal, but it might be enough to get you moving.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement