O'Reilly logo

JavaBeans Unleashed by Rick Leinecker, Dr. Donald Doherty

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

SimpleContainer JAF-Compliant Container Example

SimpleContainer is a simple Java bean container that uses JAF. Supplying a file name to SimpleContainer starts the container, which creates a FileDataSource on the file and displays the MIME type of the file's content. SimpleContainer queries the available commands and creates a button for each operation that JAF defines on the file's content. When the user presses a button, SimpleContainer activates the corresponding bean.

When SimpleContainer runs, we supply it with the file name of an HTML file. At the top of the screen we display the file name and its MIME type. The activated bean is displayed in the center of the screen. In this case, we have activated the view command, which in turn activates ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required