Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can do "java -jar MyApp.jar -Dport=8080" with both Tomcat and Jetty using what they call "embedded mode". I like the Jetty embedded mode much more because it starts up so much faster. The Tomcat embedded mode does have the benefit of an easier to understand API, but it's not worth the speed trade-off for me.

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.



The list of technologies is really intimidating for outsiders. Its not like "Oh, XYZ, thats just Django templating language". When I see Struts and Hibernate, I know those things as gigantic opaque stuff that will take a long time to learn...




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: