web server - Borland Technical Publications

web server - Borland Technical Publications web server - Borland Technical Publications

techpubs.borland.com
from techpubs.borland.com More from this publisher
12.11.2014 Views

Borland web container implementation Typical web application development process In a typical development phase for a web application: 1 The web designer writes the JSP components, and the software developer creates the servlets for handling presentation logic. 2 In conjunction, other software engineers write Java source code for servlets and the .jsp and .html for processing client request to the server-side components (EJB application tier, CORBA object, JDBC object). 3 The Java class files, .jsp files, and the .html files are bundled with a deployment descriptor as a Web ARchive (WAR) file. 4 The WAR file (or web module) is deployed in the Borland web container as a web application. For more information about using the BES Deployment Descriptor Editor (DDE) to create a Web ARchive (WAR) file, go to the User's Guide, Using the Deployment Descriptor Editor section. Web application archive (WAR) file In order for the Borland web container to deploy a web application, the web application must be packaged into a Web ARchive (WAR) file. This is achieved by using the standard Java Archive tool jar command. The WAR file includes the WEB-INF directory. This directory contains files that relate to the web application. Unlike the document root directory of the web application, the files in the WEB-INF directory do not have direct interaction with the client. The WEB-INF directory contains the following: Directory/File name /WEB-INF/web.xml /WEB-INF/web-borland.xml /WEB-INF/classes/* /WEB-INF/lib/*.jar Contents the deployment descriptor the deployment descriptor with “Borland-specific DTD.” the servlets and utility classes. The application class loader loads any class in this directory. the Java ARchive (JAR) files which contain servlets, beans, and other utility classes useful to the web application. All JAR files are used by the web application class loader to load classes from. Borland-specific DTD The web.xml file contains the standard deployment descriptor facilities for web applications. However, the web-borland.xml file contains some Borland-specific extensions. The following tables describes the Borland-specific elements and how to use them. Some of these augment the standard constructs and some are new constructs. Chapter 4: Web components 33

Borland web container implementation Note All attributes listed for each element are required. Table 4.2 Borland-specific new elements Element Required Description Default Behavior DDEditor Pane context-root no Specifies a userdefined name for the web application. To designate the application as the root web application, type: “!ROOT!”. web-deploypath(service, engine, host) no Specifies exactly where to deploy the web application (service, engine, host). The Borland web container (based on Tomcat) has a notion of a host being part of an engine which in itself is a part of a service. There can be multiple hosts under an engine and there can be multiple engines under a given service. A given web application can be deployed to one or more of these hosts. The service, engine, and host you specify using this element, override the defaults. However, this element does accept multiple entries. By default, the WAR name (without the .war extension) is used for the application if there is no context-root at the EAR level. By default, the webdeploy-path is defined in the following file: \var\ domains\\ configurations\ \ \ adm\ tomcat\conf\webborland.xml If no web-deploy-path is defined in this file, then the default is: service=HTTP, engine=HTTP, and host=* (deploy to all hosts available under the specified engine) General Web Deploy Paths 34 BES Developer’s Guide

<strong>Borland</strong> <strong>web</strong> container implementation<br />

Note<br />

All attributes listed for each element are required.<br />

Table 4.2<br />

<strong>Borland</strong>-specific new elements<br />

Element Required Description Default Behavior DDEditor Pane<br />

context-root no Specifies a userdefined<br />

name for<br />

the <strong>web</strong> application.<br />

To designate the<br />

application as the<br />

root <strong>web</strong><br />

application, type:<br />

“!ROOT!”.<br />

<strong>web</strong>-deploypath(service,<br />

engine, host)<br />

no<br />

Specifies exactly<br />

where to deploy the<br />

<strong>web</strong> application<br />

(service, engine,<br />

host). The <strong>Borland</strong><br />

<strong>web</strong> container<br />

(based on Tomcat)<br />

has a notion of a<br />

host being part of<br />

an engine which in<br />

itself is a part of a<br />

service. There can<br />

be multiple hosts<br />

under an engine<br />

and there can be<br />

multiple engines<br />

under a given<br />

service. A given<br />

<strong>web</strong> application can<br />

be deployed to one<br />

or more of these<br />

hosts. The service,<br />

engine, and host<br />

you specify using<br />

this element,<br />

override the<br />

defaults. However,<br />

this element does<br />

accept multiple<br />

entries.<br />

By default, the WAR<br />

name (without the .war<br />

extension) is used for<br />

the application if there is<br />

no context-root at the<br />

EAR level.<br />

By default, the <strong>web</strong>deploy-path<br />

is defined in<br />

the following file:<br />

\var\<br />

domains\\<br />

configurations\<br />

\<br />

\<br />

adm\<br />

tomcat\conf\<strong>web</strong>borland.xml<br />

If no <strong>web</strong>-deploy-path is<br />

defined in this file, then<br />

the default is:<br />

service=HTTP,<br />

engine=HTTP,<br />

and host=*<br />

(deploy to all<br />

hosts available<br />

under the<br />

specified engine)<br />

General<br />

Web Deploy<br />

Paths<br />

34 BES Developer’s Guide

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!