PDA

View Full Version : Jython and Kawa for Java servlets


Ramsus K
May 3rd, 2006, 12:07
Anyone else try this yet? My cheap hosting added optional support for running Java servlets, so I tried it out. Let me tell you, Jython and Tomcat do not like each other. You can write a new application in day, but deploying it is near impossible. If it "just worked," it'd be pretty amazing, especially since during the development phase you can just skip all of that compiling.

Then there's Kawa, which seems to have better Java support, but it's even more finicky with Tomcat, and learning how to interface Java code with Scheme code could take a week or two. Besides that, the documentation in this area is downright weak.

Overall though, I'm quite impressed with the whole Java servlet thing. It's a bit over-engineered, but not nearly as badly as it first seems or others make it out to be.

It'd never be my first choice as a solo developer, but it's by no means "bad." Just less good.

Proto
May 4th, 2006, 14:57
well... personally I've never tried non-java servlets (although a quick google search returned this (http://seanmcgrath.blogspot.com/JythonWebAppTutorialPart1.html)) but now that I think about it the idea seems to be pretty interesting (seeing as how I like Python a lot more than Java :nod:)

especially since during the development phase you can just skip all of that compiling.

Well... you could try and automated development environment like Eclipse, and just let the IDE handle all the compilation process for you :p

Ramsus K
May 4th, 2006, 15:53
If I really wanted, I could set up Emacs or Xcode to do the same thing. I just don't work with compiled languages much, so the thought hadn't occurred to me.

Still, my G4 iBook isn't exactly "fast" when it comes to Java (takes a few moments to compile even simple stuff), and I have to restart Tomcat each time I do compile a new version of the servlet (is there a way around this?).

For now, I've gone back to using Python CGI scripts for my current projects. I've taken the reStructuredText parser from docutils and built a lightweight wiki around it.

Proto
May 4th, 2006, 16:11
Still, my G4 iBook isn't exactly "fast" when it comes to Java (takes a few moments to compile even simple stuff), and I have to restart Tomcat each time I do compile a new version of the servlet (is there a way around this?).

You can use the tomcat manager(http://localhost:8080/manager/html normally) to only redeploy an specific servlet... Tomcat also allows for automatic redeploying of JSP elements IIRC, but about the servlets you'll have to do it the manual way...

Ramsus K
May 4th, 2006, 16:56
Thanks. That's what I was looking for.