Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML
 
 
Hot Web Programming Job

 

Tutorial Categories: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML


 

Search Host

Monthly Fee($)
Disk Space (MB)
Register With us for Newsletter!
Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Have tutorials?
Add your tutorial to our Java Resource and get tons of hits.

We offer free hosting for your tutorials. and exposure for thousands of readers. drop a mail
roseindia_net@yahoo.com
 
   

Tutorials

Java Server Pages

JAXB

Java Beans

JDBC

MySQL

Java Servlets

Struts

Bioinformatics

Java Code Examples

Interview Questions

 
Join For Newsletter

Powered by groups.yahoo.com
Visit Group! Post Questions!

Web Promotion

Web Submission

Submit Sites

Manual Submission?

Web Promotion Guide

Hosting Companies

Web Hosting Guide

Web Hosting

Linux

Beginner Guide to Linux Server

Frameworks

Persistence Framework

Web Frameworks

Free EAI Tools

Web Servers

Aspect Oriented Programming

Free Proxy Servers

Softwares

Adware & Spyware Remover

Open Source Softwares

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>
					
					

RoseIndia.net
Join Our Java  News Group


Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum

About Us | Advertising On RoseIndia.net

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2004. All rights reserved.