Chapter 16. Developing Web Components

This chapter is for the Web Component provider; that is, the person in charge of developing the web components on the server side.

16.1. Introduction to Web Component Development

A Web Component is a generic term that denotes both JSP pages and servlets. Web components are packaged in a .war file and can be deployed in a JOnAS server via the web service. Web components can be integrated in a J2EE application by packing the .war file in an .ear file (refer to Chapter 22 Defining the EAR Deployment Descriptor).

The JOnAS distribution includes a Web application example called The EarSample example (see http://www.objectweb.org/jonas/current/examples/earsample).

The directory structure of this application is as follows:

etc/xmlContains the web.xml file that describes the web application.
etc/resources/webContains HTML pages and images; JSP pages can also be placed here.
src/org/objectweb/earsample/servletsServlet sources
src/org/objectweb/earsample/beansBeans sources

If beans from another application will be used, the bean directory is not needed.