The default BUG software stack includes a simple Java web server and Servlet implementation. The speed and simplicity comes at the expense of functionality. In the web world, this means that JSP isn't supported. To help remedy this, we created Sewing, a simple web framework for embedded OSGi systems. It's not JSP, but it is Freemarker based and has a simple MVC architecture that makes creating dynamic web sites easy. If you want to host a full Java web application and JSP on BUG, you have to leave BUG's stock JVM behind.
Recently I got Jetty, a java-based, open source HTTP Server and Servlet container, running on BUG along with a simple Java web application framework called Stripes. Here's what I had to do:
Both ipk and Jetty like to put things in /tmp which, by default on the BUG, is a tmpfs only 8 MB big. You may get errors installing ipks or running Jetty that say "device full" or something like that. You can fix this by editing /etc/fstab. Open /etc/fstab in vi, and on the 5th line change size=8M to be size=64M. Then restart your BUG.
The next step is to install a Java 1.5 compatible JVM on BUG. Cacao + GNU Classpath is available in our extras repo, but I had some problems with a couple of libraries in the classpath that caused Jetty to throw errors and it was slow. So, my collegues made Cacao + OpenJDK available as a tarball of ipks. You can download this directly to your BUG:
wget http://bugcommunity.com/downloads/files/openjdk.tar.gz
Uncompress this and install the ipks
ipkg install *.ipk
Now you have a more complete version of Java. Check it out:
root@bug:~# java -version
java version "1.6.0_0"
IcedTea Runtime Environment (1.5-rffe92bbe7e84) (build 1.6.0_0-b16)
CACAO (build 0.99.4, compiled mode
As agordon would say, "Groovy!"
Now you have to install Jetty. I got the latest release of Jetty 6 I could find here: http://dist.codehaus.org/jetty/ . It comes as a .zip, which you can put directly on your BUG and unzip. After you unzip the Jetty archive, you can run Jetty with the default configuration on port 8080.
cd jetty-6.1.21
java -jar start.jar
It takes about a minute for things to get going, and you'll see debug messages on your screen (and errors if there are any). But if all goes well, you should be able to browse to http://<BUG-IP>:8080/ and see the Jetty welcome page. There are a couple of JSP examples to try out and also a cool Cometd example, so give it a spin.
Now, most people, including myself, are not content to hack JSP in the old-school way. I decided to try out a small and compelling Java web framework called Stripes. Getting it to work on the BUG was a breeze.
For this proof of concept, I followed the Stripes Quickstart Guide and created the calculator Stripes application. I used Eclipse and its web development plugins to create a Dynamic Web Project. I added the Jetty jars to the classpath and followed the directions in the Quickstart Guide to create the project. Finally, using Eclipse, I exported the finished project as a war file (mine was called stripes1.war).
To test your new Stripes application on the BUG, copy the war file into your jetty/webapps folder and restart the server. The war file will be picked up automatically. You can then browse to your application. In my case it was: http://<BUG-IP>/stripes1/quickstart

Loading recent content...





Post Comments
Add Your Comment!
nike air max http://www.nike-nike.com
nike air max 90 http://www.nike-nike.com
nike air max shoes http://www.nike-nike.com
MBT shoes http://www.mbtshoes.cc
anti shoes http://www.mbtshoes.cc
cheap mbt http://www.mbtshoes.cc
coach bags http://www.coachonsale.net
coach outlet http://www.coachonsale.net
coach outlet store online http://www.coachonsale.net
chanel bags http://www.chanels.cc
chanel online http://www.chanels.cc
chanel handbags http://www.chanels.cc
louis vuitton bags http://www.uselv.com
LV handbags http://www.uselv.com
louis vuitton outlet http://www.uselv.com
coach outlet http://www.coachs.cc
coach outlet store online http://www.coachs.cc
coach handbags http://www.coachs.cc
I recently to visit your blog, reading, I very much enjoy, and above the content is great.
Luxury watches are breitling watches best watches breitling watches for people to show off their wealth. So, whether you replica breitling for sale are looking replica breitling for sale for a watch to match with your outfits or fake breitling one to fake breitling suit your personality, luxury watches would never let you down by boots providing a boots smart, sober and elegant look. And there are some other ugg boots valuable watches ugg boots that reflect a person's taste and style. The range of luxury is increasing with the ugs passage of ugs time as well as the changing trends. For instance, in Raymond Weil, which is one of ugg classic tall boots the top most ugg classic tall boots brands
<a href=http://www.super-p90x.com/>P90X Workout DVDs</a>
<a href=http://www.super-p90x.com/>P90X Workout</a>
<a href=http://www.super-p90x.com/>P90X</a>
<a href=http://www.super-p90x.com/>P90x reviews</a>
<a href=http://www.perfectwatchs.net/>Replica Watches</a>
<a href=http://www.perfectwatchs.net/chopard>Replica Chopard Watches</a>
<a href=http://www.perfectwatchs.net/iwc>IWC Replica Watches</a>
<a href=http://www.perfectwatchs.net/dolce-gabbana>Dolce-Gabbana</a>
Me and my friend were arguing about an issue similar to this! Now I know that I was right. lol! Thanks for the information you post.
Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful.
This sounds good. It's worth a read here.
This is an excellent place for information on jquery,
That is an awfully astounding column you've posted.
That is an awfully astounding column you've posted.
<abbr title="Tue Aug 03 04:23:40 -0400 2010" class="published" />
That is an awfully astounding column you've posted.
Some merchants who sell replica watchesa lot of fine wine have taken it into their fake watches own hands to ascertain authenticity.fake rolex English wine merchant Corney and Barrow replica rolex claims to have written and photographic records of every surviving Petrus produced since breitling 1964 and uses these along with tell-tale signs on the cork, bottle and label to authenticate the wine.
FSFSDFSDFSDFSDFDS
This is an excellent place for information on jquery,
keep up the good work,
im making this just now, so I can come back to it in a a bit,
Thank you very much!!!
Its amazing, looking at the time and effort you put into your blog and detailed information you provide.It's very beautiful!!!
That is an awfully astounding column you've posted.
Thanks a lot for that a fantastically amazing post!
Your thoughts was very well laid out and very informative,led light bulbs ,honeycomb panels , Thank you for sharing with us, ceramic sink.
» Comments RSS