From: "Martin Cooper" <[EMAIL PROTECTED]> > What is the current thinking about the use of Jelly in a servlet > environment? > > Rummaging around in the Jelly sources, I've encountered comments like this: > > "If Jelly is used in a Servlet situation then 'request', 'session' and > 'application' are other names for scopes" > > However, I don't see any actual support for this kind of thing. What would > be needed to add it?
The biggest change is to support pluggable 'Scopes'. There's a JIRA bug for this... http://jira.werken.com/secure/ViewIssue.jspa?id=10012 Right now the JellyContext methods to lookup variables use an internal Map. We should change this to support pluggable hierarchies of Scope objects. Once we've got pluggable hierarchies of scopes in a JellyContext, we could have a RequestScope, ParameterScope, SessionScope etc. Then given a HttpRequest we could generate a standard JellyContext with the correct variable scopes such that users can access variables in each scope from within Jelly scripts. Ultimately this code could be common across Jexl, Jelly and JSTL-EL too. Though lets get it working first for Jelly then see how we can refactor and share code after that. We also need a JellyServlet along with maybe a cache of Scripts, similar to how Velocity works in a Servlet. > Also, has any thought been given to how a Jelly script might access the > usual request and response objects for a servlet request? I think we should follow the JSTL lead and use standard 'implicit variables' available to the script. There's some examples here http://www.onjava.com/pub/a/onjava/2002/08/14/jstl1.html?page=2 So valid expressions could be ${header['User-Agent']} or ${sessionScope.foo} > I'm somewhat of a newbie to Jelly, but I'm very interested in using Jelly in > a servlet environment. I'd be happy to contribute code, if someone could > start me off in the right direction. Cool. James ------- http://radio.weblogs.com/0112098/ __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
