lift - How do I load a javascript file as text (String)? -


i know can load html (nodeseq) using templates("file" :: "address" :: nil). there similar way load javascript file /src/main/webapp/ inputstream or string?

ok, found solution, let stay in history...

one can obtain resource files inside /src/main/webapp/ using liftrules.loadresourceasstring("/index.html").openor("")

for example, load js file jccmd 1 can use jscmds.run(liftrules.loadresourceasstring("/js/my.js").openor(""))


Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -