1

im trying to load a servlet for grid(xml) and I got that error "Failed to load resource: the server responded with a status of 404 (Not Found) error in server". How can i solve this?

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Data Binding Example</title>
<!-- <script type="text/javascript" src="ext-5.1.1/ext-all.js"></script> -->

<script type="text/javascript" src="ext-5.1.1/build/ext-all-debug.js"></script>

<link rel="stylesheet" type="text/css"
    href="ext-5.1.1/examples/shared/example.css" />

<!-- GC -->

<script type="text/javascript"
    src="ext-5.1.1/examples/shared/include-ext.js"></script>
<script type="text/javascript"
    src="ext-5.1.1/examples/shared/options-toolbar.js"></script>

<!-- page specific -->
<script type="text/javascript" src="app.js"></script>
</head>
<body>
    <h1>Data Binding Example</h1>
<!--    <p> -->
<!--        This example expands upon the <a href="xml-grid.html">XML Grid -->
<!--            example</a> and shows how to implement data binding for a master-detail -->
<!--        view. -->
<!--    </p> -->
<!--    <p> -->
<!--        Note that the js is not minified so it is readable. See <a -->
<!--            href="app.js">app.js</a>. -->
<!--    </p> -->
    <div id="binding-example"></div>
</body>
</html>
dyachenko
  • 1,216
  • 14
  • 28
Speedo93
  • 11
  • 1
  • 5

1 Answers1

-1

Also make sure your link is correct, try using an absolute path:

"<a href="/HomeDirectory/Data/Xml/xml-grid.html">"

If that doesn't work either give some more info.

If you don't have any server side code it will be hard to load a XML File from your directory.

If the content is really simple (eg just a list) then your file could just be a simple array.

var questions = [
  "What time is it?",
  "Is the sky blue?",
  "What do you call a fish with no legs?"
];

You can just include this file in your page with a script tag:

<script src="questions.js"></script>

If your question structure is more complicated you can include it in a JSON format that allows for complex nesting etc.

var questions = [
  {
    "id":1,
    "question":"What time is it?",
    "datatype":"text"
  },
  {
    "id":2,
    "question":"Is the sky blue?",
    "datatype":"boolean"
  },
  {
    "id":3,
    "question":"What do you call a fish with no legs?",
    "datatype":"text"
  }
];
DieVeenman
  • 457
  • 1
  • 3
  • 18