TableTools: No mapping found error

TableTools: No mapping found error

ev0lution37ev0lution37 Posts: 8Questions: 2Answers: 0
edited October 2013 in TableTools
I'm having an issue with the SWF file loading properly (only the print button works). I've seen all the responses, but none of those fixes have worked for me.

We're trying to implement TableTools after the fact, so our directory structure is a tad skewed. Within the webapps folder of tomcat, the outward facing .JSP files are located:

/webapps/IRISUI/WEB-INF/view/*.jsp

While the Javascript files are located:

/webapps/IRISUS/resources/scripts/*.js (the 'media' folder is at /webapps/IRISUS/resources/scripts/media/*)

Here's what I have when setting up the datatables:

[code]
articleTbl = $( articleTableIdStr ).dataTable({

"bServerSide" : true,
"bProcessing" : false,
"iDisplayLength" : 100,
"sServerMethod" : "POST",

"bDeferRender" : true,
"bJQueryUI" : true,
"sPaginationType": "full_numbers",
"aaSorting" : [], // disable default sorting

"sDom": 'T<"clear">lfrtip',
"oTableTools": {
"sSwfPath": "/opt/tomcat/apache-tomcat-ozone_GU/webapps/IRISUI/resources/scripts/media/swf/copy_csv_xls_pdf.swf"
},

"sAjaxSource" : $("#context").val() + '/articlesDataSource',
[/code]

However, I'm still getting this error:

[quote]
WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/IRISUI/media/swf/copy_csv_xls_pdf.swf] in DispatcherServlet with name 'appServlet'
[/quote]

It's as if the sSwfPath isn't working. Any insight? Thanks in advance.

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Please link to a test page showing the problem.

    Is your entire /opt directory web accessible!?

    Allan
  • ev0lution37ev0lution37 Posts: 8Questions: 2Answers: 0
    Unfortunately I'm on an intranet so I can't give a test page. /opt/ is web-accessible, however I can feasibly move the swf file into any directory necessary within Tomcat to make it work.
  • ev0lution37ev0lution37 Posts: 8Questions: 2Answers: 0
    I think this somehow ties into Spring's mapping for URI.

    Within my Spring appServlet file, I have the following mapping established:

    [code]
    <?xml version="1.0" encoding="UTF-8"?>


    <!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure -->

    <!-- Enables the Spring MVC @Controller programming model, Custom Annotations for Controllers -->







    <!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory -->


    <!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory -->





    <!-- Required to read annotation based configuration inside java files -->



    [/code]

    Basically saying my outward facing index.jsp file is located in WEB-INF/views and my resources are located in /resources. This file is giving me the mapping error when the .swf file is attempting to load. Has anyone else ran into a similar issue?
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    There are only a few other Spring users on this forum. If its a Spring path mapping issue, I'd suggest you ask in a Spring forum.

    Allan
  • ev0lution37ev0lution37 Posts: 8Questions: 2Answers: 0
    Thanks, Allen. I'll try to find something on their forums.
  • ev0lution37ev0lution37 Posts: 8Questions: 2Answers: 0
    Finally resolved this issue.

    If anyone runs into this same problem, the solution is pretty simple. You need to set up default mapping for your swf file.

    Within your web.xml file (webapps/webappname/WEB-INF/web.xml), add this to the servlet-mapping section:

    [code]

    default
    *.swf

    [/code]

    This should push all .swf files to default mapping. Hope this helps someone else out in my situation!
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Excellent - thanks for letting us know.

    Allan
This discussion has been closed.