<script> causes XML tag name mismatch problem

When I try to work with a test page to create some jQuery getJSON calls, I get errors that appear in the Firefox error console:

XML tag name mismatch (expected input)
http://localhost:8080/<MyApp>/jquery-1.4.4.js
</body>

XML tag name mismatch (expected input)
http://localhost:8080/<MyApp>/json.js
</body>

The original html has the following:

<html>
  <head>
    <title>Application</title>
      <script type="text/javascript" src="/<MyApp>/jquery-1.4.4.js"></script>
      <script type="text/javascript" src="/<MyApp>/json.js"></script>
  </head>
  <body>
    <h1>Application</h1>
    <p>
    <label id="heartbeatLabel">Gateway Heartbeat:</label>
    <input id="heartbeatStatus" type="text" readonly="true" width="30">
    <input id="jsRunning" type="text" readonly="true" width="30">
    <input id="btnHeartbeat" type="button" value="Test Heartbeat" onclick="javascript:testHeartbeat();">
  </body>

Firebug tells me that javascript scripts were found, and the Net panel gives the status 200. Does anyone have any suggestions?

+3
source share
1 answer

This line is not valid:

<script type="text/javascript" src="/<MyApp>/jquery-1.4.4.js"></script>

It is impossible to have attributes <and >. You should avoid these characters, although this will not solve your problem, because I'm not sure where it comes from <MyApp>.

+1
source

Source: https://habr.com/ru/post/1795105/


All Articles