commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kelvin Tan <>
Subject Re: [Jelly] JellyServlet
Date Wed, 11 Dec 2002 06:46:34 GMT

On Mon, 9 Dec 2002 15:18:21 -0000, James Strachan said:
>Thanks for the patch Kelvin, I've committed it to CVS.
>I made a minor patch so that the URI itself could denote the script
>to run.
>So you could just run http://localhost:8080/foo/index.jelly for
>example, rather than requiring a template=index.jelly query

That's nice. I have changed the parameter "template" to "script". Its 
just that I'm so used to using Velocity. The patch you made uses 
getServletPath, which returns the url of the servlet being called. 
I've changed it to getPathInfo. 

Another thing. Is it really appropriate to require all scripts to be 
located beneath the web app's context root (which getResource does)? 
The previous impl using new File(script).getUrl had no such 

>Some thoughts for further improvement could be...
>* implement a JellyServletContext so that the getResource() method
>will use the ServletContext.getResource() method and allow access of
>relative URIs when performing <j:include>'s.


>* have a parent JellyServletContext to allow access to the
>initParams of the ServletContext via variable expressions


>* implement the JSTL mappings of request parameters, session
>parameters, cookies etc in the expression language.
>* it'd be nice to have a cache of Jelly Scripts to avoid parsing
>them each time! :-)

Here's something which is a little surprise. So it means Jelly is not 
internally caching scripts? This has some implications for usage of 
Jelly as a templating subsystem for high-load systems, I imagine. 

In any event, perhaps it would be a better idea to cache at the 
engine level, rather than the servlet level, no?

See attached for patch to JellyServlet and JellyServletContext.


The book giving manifesto     -

View raw message