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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -