From: rbill <rb...@vi...> - 2002-03-16 01:26:05
|
On Fri, 15 Mar 2002, BillWorker 2i wrote: > Just wondering if it is a good idea! > > How about developing a custom tag for web apps. One that takes jython > scriplet in its body. The request, response, session etc would be available > as explicit objects. The tag could embed a jython interpreter and execute > the given code. How I wish jsp were jython server pages! BSF makes this pretty easy, but it's not ideal. Mainly because you ruin separation of concerns by plugging exec/evals into a jsp mess. While I originally liked this idea, it turns out to be a maintenance mess! I've been away from it a bit so I have only a little progress here, but a better plan is to support jython classes right in MVC rigs like velocity (turbine), webmacro, freemarker (maybe struts, but I don't know much about it). This way there's not really code in templates, and Jython classes handle non-visual grunt work. This does more for web development with Jython than an exec/eval in jsp. |