开发者

How to reference submodule non-java resources (templates, js, css, etc)

I have playframework application that uses my playframework module. There are some static content and views/tags in the module. My app works fine when I run it in dev mode. But when deployed to tomcat6, it results in

TemplateNotFoundException: Tem开发者_开发技巧plate not found : tags/templateFromModule.html
or tags/templateFromModule.tag

I can find such template in deployed application in: WEB-INF\application\precompiled\templates\from_module_myModuleName\app\views\tags\

Please help


In your module define your static resources on /public/MODULENAME/javascripts/foobar.js, then from your application you can do @{'/public/MODULENAME/javascripts/foobar.js'}. Don't forget to turn off the /public route from your module when importing into the application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜