Cannot Access Local Files/Resources

Cannot Access Local Files/Resources

nakulshahnakulshah Posts: 2Questions: 0Answers: 0
edited February 2014 in General
Hello Team,
I am creating a website using DataTables

Context: The code is accessing image = details_open.png. The image is located in the same folder as the jsp page.

Problem: The image is *not* rendering on the webpage
(similarly, I am also not able to load the local resources datatables.css, jquery-1.8.2.js & jquery.dataTables.js; thus I am forced to use CDNs)

Solution: ?

[code]

.
..
...
.....
.......

<!-- DataTables CSS -->
<!--link rel="stylesheet" type="text/css" src="../css/datatables.css"-->


<!-- jQuery -->
<!--script type="text/javascript" charset="utf8" src="../javascript/jquery-1.8.2.js">


<!-- DataTables -->
<!---->



$(document).ready( function () {
var oTable = $('#messages').dataTable(
{
"bPaginate": true,
"aaData": ${messagesJson},
"aoColumns": [
{ "mRender": function ( data, type, row, full )
{
return '';
}, "bSortable": false},
{ "mData": "sms.text" },
.......
.....
...
..
.

[/code]

Replies

  • ashiersashiers Posts: 101Questions: 8Answers: 7
    I don't have a solution for your problem, but I noticed you are on the Java platform. You might be interested in going to the JED website where there is a backend library of classes that work with DataTables on the Java platform. Lots of examples there. http://jed-datatables.ca/jed/
  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395
    You are the only person who knows where your local resource files are located.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    We'd need a link to the page to understand a little bit better - but as tangerine says, if its a 404 error, then you need to use the correct path - and we don't know what that is!

    Allan
  • nakulshahnakulshah Posts: 2Questions: 0Answers: 0
    Thanks for your help, there were two problems:
    1. as you pointed out, the path needed tinkering
    2. there was a typo in http://java.sun.com/jsp/jstl/core

    This problem has been solved. We can mark it as closed.
This discussion has been closed.