[ 
https://issues.apache.org/jira/browse/GROOVY-1200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15983123#comment-15983123
 ] 

Yazad Khambata commented on GROOVY-1200:
----------------------------------------

[~paulk]

I went through the Groovy Servlet code base (more specifically 
groovy.servlet.ServletBinding) and compared it with the current JSP 
specification v2.3 (JSP.1.8.3 Implicit Objects on Page 80).

Here are the findings,

Most of the frequently used bindings are incorporated with some additional 
bells and whistles that go beyond the JSP specification, which is awesome. 
However, the following are not implemented,

The page and pageContext implicit variables – While page usually refers to 
“this” and is usually not very useful., pageContext  is used to share data 
between the same translation unit – and can be relatively easy to implement as 
well. PageContext is used more heavily when using or creating Tag Libraries in 
the JSP world.

The config variable – holds initialization information for a specific servlet 
(defined in the web.xml). Since the groovlets are not defined in the web.xml 
there is no room to inject groovlet specific configurations that can be used 
from config.

To summarize, the 3 objects not supported – may be redundant and/or not very 
useful because we don’t define groovlets in web.xml and we don’t have a concept 
tag libraries in groovlet. However, all these 3 objects are relatively easy to 
incorporate to make us confirm to the JSP specification’s implicit object 
requirement.


> include appropriate JSP 2.0/EL implicit variables in Groovlets
> --------------------------------------------------------------
>
>                 Key: GROOVY-1200
>                 URL: https://issues.apache.org/jira/browse/GROOVY-1200
>             Project: Groovy
>          Issue Type: New Feature
>          Components: Groovlet / GSP
>    Affects Versions: 1.0-JSR-4
>            Reporter: Demis Bellot
>              Labels: contrib
>
> While we're making life easier for the developer we should also add familiar 
> JSP 2.0/el objects where appropriate.
> looking at: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPIntro7.html, we 
> see these variables
>     * param: Maps a request parameter name to a single value
>     * paramValues: Maps a request parameter name to an array of values
>     * header: Maps a request header name to a single value
>     * headerValues: Maps a request header name to an array of values
>     * cookie: Maps a cookie name to a single cookie
>     * initParam: Maps a context initialization parameter name to a single 
> value
> Finally, there are objects that allow access to the various scoped variables 
> described in Using Scope Objects.
>     * pageScope: Maps page-scoped variable names to their values
>     * requestScope: Maps request-scoped variable names to their values
>     * sessionScope: Maps session-scoped variable names to their values
>     * applicationScope: Maps application-scoped variable names to their values
> Out of these i think it makes sense to have: 
> param,paramValues,header,headerValues,cookie,requestScope,sessionScope,applicationScope



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to