spikesource hints'n'tips

Our Top Tags

                                       

Mailing List

Keep uptodate with the latest hints'n' tips as they are published by signing up to our mailing list.

Our RSS Feeds








Latest Linux News

Free Software in Education

Sunday, 24 May 2009
Free Software: "Free Software is political because it is strongly tied with a deep political question: that of education, and access to it."

A Great Multi-Platform Music Management Application: Jajuk

Sunday, 24 May 2009
Web Upd8: "Jajuk is a very comprehensive and feature rich Open Source music management software written in Java. The software program is therefore available for Windows, Linux and Apple Macintosh comp

Kiwi Imaging System - Forge your own operating system images in a matter of hours

Saturday, 23 May 2009
Dedoimedo: "Would you like to be able to create custom, ready-to-use operating system images that can be used as VMware images, Xen virtual machines or live DVDs or booted from USB sticks? Would you l

Linux Myth: No Simple, Easy Database Software

Saturday, 23 May 2009
The ERACC Web Log: "In this installment of my Linux Myth series I take aim at the GNU/Linux database nay-sayers, and shoot them down."

Finding the right open-source savvy lawyer

Saturday, 23 May 2009
Practical Technology: "Some days, like it or not, you need a lawyer. For most business purposes, picking the right law firm isn’t usually that big of a deal"

Latest Digg Entries

Invoking Jetty as an embedded server

posted Wednesday, 16 August 2006
It is often overlooked that Jetty can be used as an embedded web+servlet container to any java application.  It was recently asked on the Jetty Mailing list as to why you would want to do as this as well as how you would do this.  David Yu stepped up to the plate and offered up a simple code snippet for illustrating the how part:
  Server server = new Server();
  Connector connector=new SelectChannelConnector();
  connector.setPort(8080);
  server.setConnectors(new Connector[]{connector});
  WebAppContext webappcontext = new WebAppContext();
  webappcontext.setContextPath("/foo");
  webappcontext.setWar("C:/path/to/your/folder");
  server.setHandler(webappcontext);
  server.start();
  server.join();
As for the why part, that all depends on your application.  If you had a desktop application you could offer a help based system that was authored in HTML and simply give your users an embedded browser to view this data, allowing you to easily update the content without recompiling the code.  Another application is very similar to how Google operates some of its desktop applications.  Instead of popping up a dialogue window, you could pop-open a browser and have the user fill in their settings there.

tags:    

links: digg this    del.icio.us    technorati    




Related Posts

How can I start a Java process and retain its process id?

Monday, 2 October 2006 2:41 P GMT
How can I start a Java process and retain its process id?

Handling different Java runtimes on a single machine

Thursday, 14 September 2006 10:48 A GMT
This entry takes a quick look at how you can best utilise different Java JVMs on the linux using a couple of techniques.

Invoking Jetty as an embedded server

Wednesday, 16 August 2006 2:24 P GMT
Ever wondered how to invoke Jetty as an embedded server? David Yu from the Jetty Mailing list recently posted a way you can do this.

How to install JMeter and use it for testing

Sunday, 11 September 2005 8:00 A GMT
Apache JMeter is a 100% pure Java desktop application designed to test performance on static/dynamic resources such as static files, Servlets, CGI scripts. JMeter can also be used to regression test application by creating test scripts.

Introduction to JVM crashes

Friday, 9 September 2005 10:33 A GMT
Things to look for when checking a JVM crash

Configuring JGroups to avoid using multicasting

Wednesday, 31 August 2005 7:54 A GMT
JGroups - the cluster library used by Jboss, uses multicasting for cluster communication. This article discusses configuration of JGroups so that it does not use multi casting.

How to import a certificate from file in Java using keytool

Wednesday, 17 August 2005 4:56 P GMT
How to import a certificate from file in Java using keytool