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

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -