BUG ships with the PhoneME Advanced Personal Profile JVM and an OSGi implementation called Concierge. The stack is very lightweight, designed to run well on embedded devices. This lightweight software stack has it's obvious advantages, but it can be limiting when trying to write apps geared more toward desktop or server environments.
One of Concierge's facilities is a very bare-bones HttpServlet implementation. It makes writing simple web applications and services possible, but not necessarily easy. Meanwhile, modern web frameworks tend to require Java 1.5 or better and a more complete servlet container. Out of these limitiations, and a desire to create compelling web applications served from the BUG, Sewing was born.
Sewing is a simple embedded-OSGi web framework.
Sewing offers some conventions and abstractions that make developing web applications on BUG much easier. Sewing also includes some libraries from FM-Classic, a pre-cursor to the popular template engine, freemarker. FM-Classic allows programmers to create dynamic, data-rich web pages. Lastly, Sewing runs within the Concierge OSGi runtime on BUG, which provides access to other BUG applications, BUG services, hardware modules, etc.
The easiest way to get started with Sewing is to download the framework into Dragonfly. It is currently in Beta release and can be found on BUGnet here: http://buglabs.net/applications/com.buglabs.osgi.sewing. Next, download the SewingStubApplication, which is a good starter application that includes useful code and documentation: http://buglabs.net/applications/SewingStubApplication. Finally, give us feedback. We hope to include Sewing as part of the stock installation of the BUG software stack, making it even easier to create web applications on BUG.
For help with the freemarker templates and the creation of model objects (for loading data in your templates), please check out the fm-classic site at http://fm-classic.sourceforge.net/. We're working on a more comprehensive tutorial, but for now, feel free to ask for help on our IRC channel. And happy sewing!