TableTools: No mapping found error
TableTools: No mapping found error
ev0lution37
Posts: 8Questions: 2Answers: 0
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.
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.
This discussion has been closed.
Replies
Is your entire /opt directory web accessible!?
Allan
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?
Allan
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!
Allan