Subj : Re: Using Rhino from JSP or like JSP To : Igor Bukanov From : McKinley, Richard Date : Fri Aug 20 2004 04:17 pm I wanted to let everyone know that I fixed all the problems with the BSF JavaScript engine. The problems centered on failing to enter context on tag initialization and introduction of JSP objects (out, request, response) into the scope. I'm trying to run it through the paces, especially making use of E4X. I'll submit a patch to the Jakarta BSF project next week and then I will start work on the Rhino specific taglib. Honestly, E4X changes everything about JSP development. I think what we are going to see is a system that will allow a programmer to rapidly prototype pages with a unique ability to easily divide the design as complexities arise. Also, E4X is a giant leap forward for readability. Compare and contrast: /* Regular JSP in Java */ String sqlFirstClient = "select *, 1 level from client " + "where client_id = ? and delete_flag = 0"; String sqlSubsequentClient = "select *, ! level from client " + "where parent_id = ? and delete_flag = 0 " + "order by description"; With: /* JSP in E4X */ var sql = select * from client where client_id = ? and delete_flag = 0 select * from client where parent_id = ? and delete_flag = 0 order by description ; Notice that there is no need to deal with quoted strings? Also, rather than have two separate string variables to hold these two closely related sql statements they now reside in a central data structure, an XML object called sql. As more queries are potentially added to the sql object it may be distracting to the logic of processing the query results. The in-line XML literal is perfectly poised to be moved into a sql.xml file in the WEB-INF directory or a dynamic JSP page that has the sole job of dynamically producing the sql query XML document. Of course E4X can pull those resources into any JSP page as an XML object read from a file system or URI. As you can see, one can prototype quickly in JSP with E4X and then restructure into separate layers along the lines of MVC or whatever the architecture de jour is in fashion. The point is one can start in E4X and stay in E4X. Cheers, McKinley Igor Bukanov wrote: > Right, the native bindings would be nice but it is also worth to try to > restore compatibility as well in the forthcoming Rhino 1.6R1. If BSF has > an issue, then probably some other applications would be hit during > upgrade to recent Rhino releases as well. Do you have a stack trace to > look? > > Regards, Igor .