允许用户脚本内嵌,内嵌有什么脚本引擎在那里为任何.NET或Java? [英] Allowing users to script inline, what inline scripting engines are there for either .net or java?

查看:164
本文介绍了允许用户脚本内嵌,内嵌有什么脚本引擎在那里为任何.NET或Java?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何开放源代码的脚本引擎,让你给你的用户能够通过一个基于Web的界面在页面上进行光脚本的能力吗?



(某些对象/ 。藏品将被预填充,并有安全的地方,以便用户无法攻入Web应用程序的内部运作等)



例如:



http://wiki.shopify.com/UsingLiquid



另外我觉得vBulletin有一些自定义的脚本引擎和标签,你可以做这样的事情:

 <若:user.isloggedin> 
< /若>


解决方案

Java有的脚本框架(Java 6中),这将允许你(通过网络),以在众多提交的脚本不同的语言(从我的头顶,插件可用于红宝石 /的的Python / 的Javascript )。然后,脚本引擎可以运行此。



页面可以使用标准的JSP进行修改,或者通过的 Apache的速度的Freemarker 模板。



我不知道你会如何实现安全性的一个有意义的形式,虽然。也许通过产卵了与特定的访问策略,一个新的JVM。这可能是某些场景稍微重量级的,但。


Are there any open source scripting engines that allow you to give your users the ability to perform light scripting on pages via a web based interface?

(some objects/collections would be pre-populated, and have security in place so users can't hack into the web application's inner workings etc.)

Examples:

http://wiki.shopify.com/UsingLiquid

Also I think vBulletin has some custom scripting engine and tags where you can do things like:

<if: user.isloggedin>
</if>

解决方案

Java has the scripting framework (in Java 6) which would permit you (via the web) to submit a script in numerous different languages (off the top of my head, plugins are available for Ruby/Python/Javascript). The scripting engine can then run this.

Pages could be modified using standard JSPs, or perhaps via Apache Velocity or Freemarker templates.

I'm not sure how you'd implement a meaningful form of security, though. Perhaps via spawning off a new JVM with particular access policies. That may be a little heavyweight for some scenarios, though.

这篇关于允许用户脚本内嵌,内嵌有什么脚本引擎在那里为任何.NET或Java?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆