scriptlet

  • 网络脚本片段;小脚本;脚本小程序
scriptletscriptlet
  1. Full JSP scriptlet support , outside code changes immediately available in scriptlets

    全面支持JSPscriptlet,外部代码变化在scriptlet中立即生效

  2. The only way to reuse a scriptlet is by copy-and-paste .

    重用Scriptlet的惟一方式就是“复制-粘贴”。

  3. In general , you should not put scriptlet code into your JSPs , and instead use tags for those tasks .

    通常,不应将Scriptlet代码放置到JSP中,而应使用标记完成这些任务。

  4. This similarity is intended is to help alleviate the sharp contrast between the HTML intermingled with JSP scriptlet code .

    这点相似之处是特意用了帮助减少html和jsp脚本明显的差异。

  5. Custom tags are a great way to reuse short snippets of code that might otherwise end up in a copy / pasted scriptlet .

    自定义标记是重用简短代码的好方法,从而避免成为只能复制/粘贴的scriptlet。

  6. In order to use it , simply call out . print () or out . println () from within a JSP scriptlet .

    在JSPscriptlet中可以通过简单地调用out.print()或out.println()使用它。

  7. Whatever is inside a declaration , scriptlet , or expression must be valid Java , or else the Java code in the implementation class won 't compile successfully .

    无论在声明、scriptlet或表达式中是什么内容,都必须为有效的Java,否则就无法成功编译实现类中的Java代码。

  8. The Groovy in Groovy Server Pages not only identifies the underlying technology , but also the language you can use if you want to write a quick scriptlet or two .

    Groovy服务器页面中的Groovy不仅代表底层技术,还代表可以快速编写一两个scriptlet的语言。

  9. So , open grails-app / views / computerBean / show . gsp , and find the scriptlet that renders the current text for the link .

    那么,打开grailsapp/views/computerBean/show.gsp,并找到展现当前链接文本的那段脚本。

  10. You should definitely feel a little bit dirty the next time you write a scriptlet , given how easy it is to do the right thing by writing a custom TagLib instead .

    下次您再编写scriptlet时,肯定会觉得有点“不舒服”,因为通过编写自定义Taglib可以更轻松地完成正确的事情。