Construct the correct structure for each of the following deployment descriptor elements: error-page, init-param, mime-mapping, servlet, servlet-class, servlet-mapping, servlet-name, and welcome-file.

Error pages.


<!--
The error-page element contains a mapping between an error code or
exception type to the path of a resource in the web application
-->

<!ELEMENT error-page ((error-code | exception-type), location)>

					

Init parameters.

				
<!--
The init-param element contains a name/value pair as an
initialization param of the servlet
-->

<!ELEMENT init-param (param-name, param-value, description?)>

					

MIME mapping.


<!--
The mime-mapping element defines a mapping between an extension and
a mime type.
-->

<!ELEMENT mime-mapping (extension, mime-type)>

					

<!--
The extension element contains a string describing an
extension. example: "txt"
-->

<!ELEMENT extension (#PCDATA)>

					

<!--
The mime-type element contains a defined mime type. example: "text/
plain"
-->

<!ELEMENT mime-type (#PCDATA)>

					

Servlet.

				
<!--
The servlet element contains the declarative data of a
servlet.
If a jsp-file is specified and the load-on-startup element is
present, then the JSP should be precompiled and loaded.
-->

<!ELEMENT servlet (icon?, servlet-name, display-name?, description?,
	(servlet-class|jsp-file), init-param*, load-on-startup?,
	security-role-ref*)>

					

<!--
The servlet-name element contains the canonical name of the
servlet.
-->

<!ELEMENT servlet-name (#PCDATA)>

					

<!--
The servlet-class element contains the fully qualified class name
of the servlet.
-->

<!ELEMENT servlet-class (#PCDATA)>

					

<!--
The jsp-file element contains the full path to a JSP file within
the web application.
-->

<!ELEMENT jsp-file (#PCDATA)>

					

Servlet mapping.

				
<!--
The servlet-mapping element defines a mapping between a servlet and
a url pattern

-->
<!ELEMENT servlet-mapping (servlet-name, url-pattern)>

					

Welcome files.


<!--
The welcome-file-list contains an ordered list of welcome files
elements.
-->

<!ELEMENT welcome-file-list (welcome-file+)>

					

env-entry


<!--
The env-entry element contains the declaration of an application's
environment entry.
This element is required to be honored on in J2EE compliant servlet
containers.

The env-entry-type element contains the fully qualified Java type of
the environment entry value that is expected by the application
code.

The following are the legal values of env-entry-type:
java.lang.Boolean, java.lang.String, java.lang.Integer,
java.lang.Double, java.lang.Float.
-->

<!ELEMENT env-entry (description?, env-entry-name, env-entry-value?,
env-entry-type)>

					

<env-entry>
	<env-entry-name>tableName</env-entry-name>
	<env-entry-value>StockTable</env-entry-value>
	<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
					
					

ejb-ref


<!--
The ejb-ref element is used for the declaration of a reference to
an enterprise bean's home. The declaration consists of:
- an optional description
- the EJB reference name used in the code of
the web application that's referencing the enterprise bean
- the expected type of the referenced enterprise bean
- the expected home and remote interfaces of the referenced
enterprise bean
- optional ejb-link information, used to specify the referenced
enterprise bean

The ejb-ref element is used to declare a reference to an enterprise
bean.

The ejb-ref-name element contains the name of an EJB
reference. This is the JNDI name that the servlet code uses to get a
reference to the enterprise bean.

The ejb-ref-type element contains the expected type of the
referenced enterprise bean.

The ejb-ref-type element MUST be one of the following:

<ejb-ref-type>Entity</ejb-ref-type>
<ejb-ref-type>Session</ejb-ref-type>

The home element contains the fully qualified name of the EJB's
home interface

The remote element contains the fully qualified name of the EJB's
remote interface

The ejb-link element is used in the ejb-ref element to specify that
an EJB reference is linked to an EJB in an encompassing Java2
Enterprise Edition (J2EE) application package.
The value of the ejb-link element must be the ejb-name of and EJB in
the J2EE application package.
-->

<!ELEMENT ejb-ref (description?, ejb-ref-name, ejb-ref-type, home,
remote, ejb-link?)>

					

<!-- reference on a remote bean without ejb-link-->
<ejb-ref>
	<ejb-ref-name>ejb/MySessionBean</ejb-ref-name>
	<ejb-ref-type>Session</ejb-ref-type>
	<home>org.sample.beans.MySessionBeanHome</home>
	<remote>org.sample.beans.MySessionBean</remote>
</ejb-ref>

					

<!-- reference on a remote bean using ejb-link-->
<ejb-ref>
	<ejb-ref-name>ejb/EjbLinkMySessionBean</ejb-ref-name>
	<ejb-ref-type>Session</ejb-ref-type>
	<home>org.sample.beans.MySessionBeanHome</home>
	<remote>org.sample.beans.MySessionBean</remote>
	<ejb-link>MySB.jar#MySessionBean</ejb-link>
</ejb-ref>
					
					

ejb-local-ref


<!--
The ejb-local-ref element is used for the declaration of a reference
to an enterprise bean's local home. The declaration consists of:
- an optional description
- the EJB reference name used in the code of the web application
that's referencing the enterprise bean
- the expected type of the referenced enterprise bean
- the expected local home and local interfaces of the referenced
enterprise bean
- optional ejb-link information, used to specify the referenced
enterprise bean

The ejb-ref-type element contains the expected type of the
referenced enterprise bean.

The ejb-ref-type element MUST be one of the following:

<ejb-ref-type>Entity</ejb-ref-type>
<ejb-ref-type>Session</ejb-ref-type>
-->

<!ELEMENT ejb-local-ref (description?, ejb-ref-name, ejb-ref-type,
local-home, local, ejb-link?)>

					

<!-- reference on a local bean -->
<ejb-local-ref>
	<ejb-ref-name>ejb/MySBLocal</ejb-ref-name>
	<ejb-ref-type>Session</ejb-ref-type>
	<local-home>org.sample.beans.MySessionBeanLocalHome</local-home>
	<local>org.sample.beans.MySessionBeanLocal</local>
	<ejb-link>secusb.jar#Op</ejb-link>
</ejb-local-ref>
					
					

resource-ref


<!--
The resource-ref element contains a declaration of a Web
Application's reference to an external resource.

The res-auth element indicates whether the application component
code performs resource signon programmatically or whether the
container signs onto the resource based on the principle mapping
information supplied by the deployer. Must be CONTAINER or SERVLET !
-->

<!ELEMENT resource-ref (description?, res-ref-name, res-type, res-auth)>

					

<resource-ref>
	<res-ref-name>jdbc/BookDB</res-ref-name>
	<res-type>javax.sql.DataSource</res-type>
	<res-auth>Container</res-auth>
</resource-ref> 
					
					

resource-env-ref


<!--
The resource-env-ref element contains a declaration of a web
application's reference to an administered object associated with a
resource in the web application's environment. It consists of an
optional description, the resource environment reference name, and
an indication of the resource environment reference type expected by
the web application code.
-->

<!ELEMENT resource-env-ref (description?, resource-env-ref-name,
resource-env-ref-type)>

					

<resource-env-ref>
	<resource-env-ref-name>jms/Orders</resource-env-ref-name>
	<resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
</resource-env-ref>
					
					

Professional hosting     Belorussian informational portal         Free SCBCD 1.3 Study Guide     Free SCDJWS 1.4 Study Guide     SCDJWS 1.4 Quiz     Free IBM Certified Associate Developer Study Guide     Free SCJP 5.0 (Tiger) Study Guide     Free Mock Exam Engine     IBM Test 000-287. Enterprise Application Development with IBM WebSphere Studio, V5.0 Study Guide