playframework - play framewrok 1.2.5 script tag not found file -


i use play framework 1.2.5,and use script tag enter image description here

and html enter image description here throw error, enter image description here

what wrong it? read script tag,enter image description hereand 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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -