Reputation: 773
I am very new to working with file concepts in java and i have a files in my folder and when i click on the file link in my page it shows action not found error page.How to solve it?Do i need to set any configurations in play?Please help me and for all help thanks in advance.
This is my link:
<td><a href="/INVOICEPROCESSINGSYSTEM/@hoForm.filePath" class="fancyboxPDF" title="@hoForm.fileName" onclick="OpenFancyBoxForHeadOfficeFormsView('@hoForm.id');">@hoForm.fileName</a></td>
And my js code is: function OpenFancyBoxForHeadOfficeFormsView(hoFormId){
$(".fancyboxPDF").fancybox({
openEffect: 'elastic',
closeEffect: 'elastic',
width:1200,
height:1000,
autoSize: true,
type: 'iframe',
loop : false,
helpers : {
overlay : {closeClick: false}, // disables close when outside clcik
},
iframe: {
preload: false // fixes issue with iframe and IE
}
});
}
Files are showing correctly without any error in production server.But in my local system getting error page with action not found.
Upvotes: 1
Views: 749
Reputation: 8263
You forget to route the URL to your function.
You must have in conf/routes
file:
GET /INVOICEPROCESSINGSYSTEM/ YourControllerClass.OpenFancyBoxForHeadOfficeFormsView(hoFormId: String)
Documentation: https://www.playframework.com/documentation/2.5.x/JavaRouting
Upvotes: 0
Reputation: 773
I got answer after doing some changes.in play it shows action not found error page.what i did is i generate war file and run it in tomcat.it works perfectly.I think i missed some path to give in play and that is the reason it shows error while run in polay framework.
Upvotes: 2