Java Reference
In-Depth Information
Figure 10.2. The GroovyDocs for ServletCategory . Each method is static and is added to the class listed in the
first argument.
A Groovy category consists of static methods having one or more arguments. The first ar-
gumenttothemethodistheclassthatreceivesthemethod.In Servlet-Category there
are only four methods, with lots of overloads (see table 10.1 ).
Table 10.1. The ServletCategory methods for different scopes
Method Name
First Argument
get(arg, String key)
ServletContext, HttpSession, ServletRequest, PageContext
getAt(arg, String key)
Same as above
putAt(arg, String key, Object value)
Same as above
set(arg, String key, Object value)
Same as above
See a pattern? The job of this category is to make it easy to add attributes at page
scope ( PageContext ), request scope ( ServletRequest ), session scope ( HttpSes-
 
 
Search WWH ::




Custom Search