(Quick Reference)

6.6.3 变量和作用域 - Reference Documentation

Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith

Version: null

6.6.3 变量和作用域

Filters support all the common properties available to controllers and tag libraries, plus the application context:

However, filters only support a subset of the methods available to controllers and tag libraries. These include:

  • redirect - For redirects to other controllers and actions
  • render - For rendering custom responses

过滤器支持控制器标签库的所有公共属性,外加应用环境上下文(application context):

尽管支持如此多的属性,但是过滤器所支持的方法仅仅是控制器和标签库的一个子集,它们是:

  • redirect - 用于重定向到其他的控制器和操作
  • render - 用于渲染自定义的响应