Lambda the Ultimate

inactiveTopic Jython Servlet
started 4/22/2001; 11:04:11 AM - last post 4/22/2001; 11:33:18 AM
Brian Zhou - Jython Servlet  blueArrow
4/22/2001; 11:04:11 AM (reads: 524, responses: 1)
This article titled "The problems with JSP" is from the author of "Java Servlet Programming".

Compared with JSP, I really enjoy using jython servlet, there's nothing you can do in JSP that you can't in jython servlet. It inherits all the features of Java servlet, without the problems of JSP. To top it all, you can use python syntax and modules (list, hash & re just to name a few) when writing servlet!

Here is a small wiki setup for people interested:

and some wiki entry pages: this is my favorite approach for clear separation of presentation and logic.

Chris Rathman - Re: Jython Servlet  blueArrow
4/22/2001; 11:33:18 AM (reads: 715, responses: 0)
Thanks for the links. Just breezing through it, I see that it's pretty well just re-using the Servlet type interface. Since the Python is being compiled down to JVM ByteCode, it's not surprising that the compiled Jython code can interface with the Servlet engine.

Though the criticism of JSP is somewhat valid, I don't think a Servlet approach necessarily gets the seperation of Content from Presentation that is being sought. It shifts the onus from the presentation layer, back to the content layer. That is, instead of having business rules scattered throughout the html like yo have with JSP, you have the problem of html scattered throughout the Model layer of the Servlet.

Ideally, most JSP applications are in reality a combination of JSP, Servlets, and business objects. The JSP should have very little programming logic other than providing a template for the objects. Of course, theory and practice are not the same in many, if not most, instances.