playframework - play framewrok 1.2.5 script tag not found file -
i use play framework 1.2.5,and use script tag
and html throw error,
what wrong it? read script tag,and echart-all.js in public/javascripts/echarts folder.so wrong it?
i add conf/routes file
get /echarts/piecharts staticfile:/public/javascripts/echarts/echarts-all.js
and change html
<script src="/echarts/piecharts""></script>
it works!
serving static resources staticdir: mapping use special action staticdir, point each folder wish publish static resources container. staticfile: mapping can directly map url path static file rendering.
reference https://www.playframework.com/documentation/1.2.4/routes
Comments
Post a Comment