by mattmiller · 14y ago · 0 comments
-Templating. Something like SimpleTemplate Engine in Bottlepy. http://bottlepy.org/docs/dev/stpl.html
-How do I get rid of Tomcat at least for development. I would like to run java -jar MyApp.jar -Dport=8080 and get a live running webapp in my dev environment.
Here's examples of both:
http://www.benmccann.com/dev-blog/embedded-jetty/
http://www.benmccann.com/dev-blog/embedded-tomcat/
I put together an example and uploaded it to GitHub. I'd love feedback on it:
https://github.com/benmccann/sprightly
P.S. Closure templates are cool because they can be used both client-side and server-side. I'm not aware of other templating languages that have this feature. I haven't used it much yet, but want to experiment with it more when I get time.
Jetty everything. You can even keep it for production.
I tend to use 'mvn tomcat:run' to run my dev server, which I find even easier, fwiw.
http://freemarker.sourceforge.net/
It's pretty simple and straigtforward, its what I use instead of JSP.
Also, if you're doing web stuff, I HIGHLY recommend sitemesh.
It's a really clean way of implementing layouts and everytime I use other languages like Python, I always try and find equivalents but am always disappointed.
The documentation is a bit thin, but the code is rock solid and very fast.
Combined with JEXL for an expression language, this is one of the best server side engines I've ever used.