<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5741951226829022127</id><updated>2024-08-29T10:33:34.148+05:30</updated><category term="Java EE"/><category term="Module"/><category term="Deployment descriptor"/><category term="Introduction"/><category term="WebApp"/><category term="component"/><category term="container"/><category term="jargon"/><category term="web.xml"/><title type='text'>Keep learning with me</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://handlingexception.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5741951226829022127/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://handlingexception.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Nishi</name><uri>http://www.blogger.com/profile/10373727161583509339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>5</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5741951226829022127.post-1688282218410892645</id><published>2010-09-09T10:43:00.167+05:30</published><updated>2010-09-10T12:28:18.841+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="web.xml"/><title type='text'>The Deployment Descriptor (web.xml)</title><content type='html'>&lt;div id=&quot;vcc_sp_p_33&quot; style=&quot;font-family: Verdana,sans-serif; text-align: justify;&quot; tabindex=&quot;6&quot;&gt;The &lt;span class=&quot;ibmfilepath&quot; id=&quot;vcc_sp_span_32&quot; tabindex=&quot;5&quot;&gt;web.xml&lt;/span&gt; file provides configuration and deployment information for the web components that comprise a web application. Examples of web components are servlet parameters, servlet and JavaServer Pages (JSP) definitions, and Uniform Resource Locators (URL) mappings. The Java Servlet specification defines the &lt;span class=&quot;ibmfilepath&quot; id=&quot;vcc_sp_span_34&quot; tabindex=&quot;7&quot;&gt;web.xml&lt;/span&gt; deployment descriptor file in terms of an XML schema document.&amp;nbsp;&lt;/div&gt;&lt;div id=&quot;vcc_sp_p_33&quot; style=&quot;font-family: Verdana,sans-serif; text-align: justify;&quot; tabindex=&quot;6&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div id=&quot;vcc_sp_p_33&quot; style=&quot;font-family: Verdana,sans-serif; text-align: justify;&quot; tabindex=&quot;6&quot;&gt;Listing 1 contains the source for a default &lt;code style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;web.xml&lt;/code&gt; file.  &lt;/div&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Listing 1&lt;/span&gt;&lt;/b&gt;&lt;b&gt; &lt;code&gt;web.xml&lt;/code&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;ISO-8859-1&quot;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!DOCTYPE web-app&lt;br /&gt;
PUBLIC &quot;-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN&quot;&lt;br /&gt;
&quot;http://java.sun.com/j2ee/dtds/web-app_2_3.dtd&quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;web-app&amp;gt;&lt;br /&gt;
&amp;lt;/web-app&amp;gt;&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;You may also see versions of the deployment descriptor that uses what is called a schema which is functionally equivalent. The start of a deployment descriptor that uses a schema will look as follows&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-7&quot;?&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;lt;web-app version=&quot;3.0&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns=&quot;http://java.sun.com/xml/ns/javaee&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; xmnls:xsi=&quot;http://www.w3.org/2001/XML-Schema -instance&quot;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xsi:schemaLocation=&quot;http://java.sun.com/xml/ns/javaee&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; http://java.sun.com/xml/ns/javae/web-app_3_0.xsd&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;/web-app&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;The web-app element is the root of the deployment descriptor for a web application. Note that the sub elements of this element can be in arbitrary order&lt;/span&gt;&lt;/span&gt;.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id=&quot;vcc_sp_p_33&quot; style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot; tabindex=&quot;6&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;web.xml Deployment Descriptor Elements&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div id=&quot;vcc_sp_p_33&quot; style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot; tabindex=&quot;6&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div id=&quot;vcc_sp_p_33&quot; style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot; tabindex=&quot;6&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The following sections describe the deployment descriptor elements defined in the &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;web.xml&lt;/code&gt; file under the root element&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&amp;lt;web-app&amp;gt;&lt;/code&gt;:&lt;/span&gt;&lt;/div&gt;&lt;div id=&quot;vcc_sp_p_33&quot; style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot; tabindex=&quot;6&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;context-param &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The optional&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; context-param &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;/span&gt;&lt;/code&gt;element contains the declaration of a web application&#39;s servlet context initialization parameters. &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;servlet&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The&amp;nbsp;&lt;code&gt;&lt;/code&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;servlet&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt; &lt;/code&gt;element contains the declarative data of a servlet. The servlet tag has two mandatory sub tags, &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;servlet-name&amp;gt;&lt;/span&gt; and &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;servlet-class&amp;gt;&lt;/span&gt;. The servlet-class tag is the fully qualified name of the class that is to be executed and the servlet-name tag is an alias for use elsewhere within the deployment descriptor.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;servlet&amp;gt;&lt;/span&gt;&lt;br style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;servlet-name&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;&quot;&gt;HelloWorldServlet&lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;/servlet-name&amp;gt;&lt;/span&gt;&lt;br style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;servlet-class&amp;gt;com.servlet.HelloWorld&amp;lt;/servlet-class&amp;gt;&lt;/span&gt;&lt;br style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;load-on-startup&amp;gt;1&amp;lt;/load-on-startup&amp;gt;&lt;/span&gt;&lt;br style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/servlet&amp;gt;&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The load-on-startup tag of the servlet indicates that the servlet should be loaded (instantiated and have its init() called) on the startup of the web application. &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The optional contents of these element must be an integer indicating the order in&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; which the servlet should be loaded.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;If the value is a negative integer, or the&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;element is not present, the container is free to load the servlet whenever it&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;chooses.&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana,sans-serif; font-size: small;&quot;&gt; If the value is a positive integer or 0, the container must load and&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: black; font-family: Verdana,sans-serif; font-size: small;&quot;&gt;initialize the servlet as the application is deployed.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The container must guarantee that servlets marked with lower integers are loaded&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; before servlets marked with  higher integers. The container may choose the order &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;of loading of servlets with the same load-on-start-up value.&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The servlet element may also have the following optional sub-elements&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;display-name,description,init-param, run-as, security-role-ref&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;servlet-mapping&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The &lt;code&gt;&lt;/code&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;servlet-mapping&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;/code&gt; element defines a mapping between a servlet and a URL pattern. Without a servlet-mapping a servlet cannot be retrieved by a visiting browser. The following example shows a servlet mapped to a url pattern.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;    &amp;lt;servlet-mapping&amp;gt;
        &amp;lt;servlet-name&amp;gt;HelloWorldServlet&amp;lt;/servlet-name&amp;gt;
        &amp;lt;url-pattern&amp;gt;/hello&amp;lt;/url-pattern&amp;gt;
    &amp;lt;/servlet-mapping&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;servlet-name tag contains the name of the servlet to which you are mapping a URL pattern. This name corresponds to the name you assigned a servlet in a &lt;code&gt;&amp;lt;servlet&amp;gt;&lt;/code&gt; declaration tag.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;url-pattern describes a pattern used to resolve URLs. The portion of the URL after the &lt;code&gt;http://host:port&lt;/code&gt; + &lt;code&gt;WebAppName&lt;/code&gt; is compared to the &lt;code&gt;&amp;lt;url-pattern&amp;gt;.&lt;/code&gt; If the patterns match, the servlet mapped in this element will be called.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Given this mapping the servlet contained within the Java file at com.servlet.HelloWorld will be executed when a browser requests http://localhost/hello. The url-pattern tag can include wildcards and it is possible to have multiple mappings to a single servlet.  &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The url-mapping value must begin with a forward slash unless it is an extension mapping. By extension mapping I mean where a wildcard is used, e.g. to map the URL pattern *.exam to a servlet you could include the value&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;lt;url-pattern&amp;gt;*.exam&amp;lt;/url-pattern&amp;gt;.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;But apart from that, mappings begin with a forward slash.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;welcome-file-list&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The optional&amp;nbsp;&lt;code&gt;&lt;/code&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;welcome-file-list&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt; &lt;/code&gt;element contains an ordered list of &lt;code&gt;welcome-file&lt;/code&gt; elements.  The welcome-file tag can be used to mark a servlet or a JSP file as the default first page that is returned when a visitor accesses a URL  if they don&#39;t specify an explicit file. This is typically used on the home page of a web site where you see the trailing slash of the URL but you don&#39;t see the name of the file that is actually returned.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;    &amp;lt;welcome-file-list&amp;gt;
        &amp;lt;welcome-file&amp;gt;welcomeservlet&amp;lt;/welcome-file&amp;gt;
        &amp;lt;welcome-file&amp;gt;default.jsp&amp;lt;/welcome-file&amp;gt;
    &amp;lt;/welcome-file-list&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; The idea of allowing multiple welcome files might seem odd at first, after all, only one file can be returned if there is no explicit file name given. The idea of allowing multiple files is that you might have a directory structure that contains files you want to use as the default welcome file.  A welcome-file value cannot start or end with a slash, and they will be picked in the order they appear in the deployment descriptor. Thus given a deployment descriptor with the following tags.&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;/pre&gt;&lt;pre style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;     &amp;lt;welcome-file-list&amp;gt;
  &amp;lt;welcome-file&amp;gt; &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;index.jsp&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &amp;lt;/welcome-file&amp;gt;  
        &amp;lt;welcome-file&amp;gt; welcome.jsp &amp;lt;/welcome-file&amp;gt;
     &amp;lt;/welcome-file-list&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The index.jsp file will be returned from a request to&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt; www.mydomain.com/. If no index.jsp file exists then welcome.jsp will be returned if it exists.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;error-page&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The optional &lt;code&gt;error-page&lt;/code&gt; element specifies a mapping between an error code or exception type to the path of a resource in the Web application. When an error occurs—while server is  responding to an HTTP request, or as a result of a Java  exception— server returns an HTML page that displays either the  HTTP error code or a page containing the Java error message. You can  define your own HTML page to be displayed in place of these default  error pages or in response to a Java exception.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;Thus the following tags would re-direct all SQL exception errors to the /errorpage.jsp page. &lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;   &amp;lt;error-page&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;       &amp;lt;exception-type&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; java.sql.SQLException &lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;/exception-type&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;       &amp;lt;location&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; /errorpage.jsp&lt;/span&gt;&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &amp;lt;/location&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;    &amp;lt;/error-page&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The following tags would re-direct all HTTP 404 errors to the /errorpage.jsp page&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;   &amp;lt;error-page&amp;gt;
      &amp;lt;error-code&amp;gt;404&amp;lt;/error-code&amp;gt;
      &amp;lt;location&amp;gt;/errorpage.jsp&amp;lt;/location&amp;gt;
   &amp;lt;/error-page&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Note that it is possible to define a specific error page for an individual JSP page using the errorPage attribute as follows.&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;    &lt;span style=&quot;color: #3d85c6; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;%@ page errorPage=&quot;MyErrorPage.jsp&quot; %&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; The page that this attribute points to must have the isErrorPage=true attribute set as follows.&lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;color: black; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;   &lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;lt;%@ page isErrorPage=&quot;true&quot; %&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;init-param&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;This is an element within the servlet. The optional &lt;code&gt;&lt;/code&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;init-param&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;/code&gt; element contains a name/value pair as an initialization attribute of the servlet. Use a separate set of &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;init-param&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;/code&gt; tags for each attribute.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://www.blogger.com/post-edit.g?blogID=5741951226829022127&amp;amp;postID=1688282218410892645&quot; name=&quot;1027033&quot;&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The init-param tag allows initialisation parameters to be passed to a servlet via the deployment descriptor. This allows configuration without having to recompile code.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;An example of how you might use the init-param tag is to inform a servlet of the JDBC driver, and username and password to access a database.The following extract from a deployment descriptor shows how the init-param called backupfrequency could be used to inform a servlet of the interval between backups.&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;pre style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;   &lt;span style=&quot;color: #3d85c6;&quot;&gt;&amp;lt;servlet&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;        &amp;lt;servlet-name&amp;gt;backupservlet&amp;lt;/servlet-name&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;        &amp;lt;servlet-class&amp;gt;com.servlet.BackupServlet&amp;lt;/servlet-class&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;        &amp;lt;init-param&amp;gt; &lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;            &amp;lt;description&amp;gt;Frequency of backup in hours&amp;lt;/description&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;            &amp;lt;param-name&amp;gt;backupfrequency&amp;lt;/param-name&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;            &amp;lt;param-value&amp;gt;24&amp;lt;/param-value&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;        &amp;lt;/init-param&amp;gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;    &amp;lt;/servlet&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The servlet can retrieve the value of the init-param through code similar to the following.&lt;/span&gt;&lt;/pre&gt;&lt;pre style=&quot;color: #3d85c6; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;   &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; ServletConfig config = getServletConfig();
   backupfrequency = config.getInitParameter(&quot;backupfrequency&quot;);&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;div style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;               &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://handlingexception.blogspot.com/feeds/1688282218410892645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://handlingexception.blogspot.com/2010/09/deployment-descriptor-webxml.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5741951226829022127/posts/default/1688282218410892645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5741951226829022127/posts/default/1688282218410892645'/><link rel='alternate' type='text/html' href='http://handlingexception.blogspot.com/2010/09/deployment-descriptor-webxml.html' title='The Deployment Descriptor (web.xml)'/><author><name>Nishi</name><uri>http://www.blogger.com/profile/10373727161583509339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5741951226829022127.post-8131218867595884429</id><published>2010-09-08T15:54:00.004+05:30</published><updated>2010-09-09T10:04:52.669+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java EE"/><category scheme="http://www.blogger.com/atom/ns#" term="Module"/><category scheme="http://www.blogger.com/atom/ns#" term="WebApp"/><title type='text'>Structure of a  Java EE  Web Module</title><content type='html'>&lt;div style=&quot;font-family: verdana; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;In the Java EE platform, &lt;span style=&quot;font-size: 85%;&quot;&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;web components&lt;/span&gt; &lt;/span&gt;provide the dynamic extension capabilities for a web&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; server. Web components can be Java servlets, web pages implemented with JavaServer Faces&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; technology, web service endpoints, or JSP pages.&lt;/span&gt; &lt;span style=&quot;font-family: verdana;&quot;&gt;Web components are supported by the services of a runtime platform called a &lt;span style=&quot;font-style: italic;&quot;&gt;web container&lt;/span&gt;. A&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; web container provides such services as request dispatching, security, concurrency, and&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; life-cycle management. A web container also gives web components access to such APIs as&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; naming, transactions, and email.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Web components and static web content files, such as images, are called &lt;i&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;web resources&lt;/span&gt;.&lt;/i&gt; A &lt;span style=&quot;font-size: 85%;&quot;&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;web module&lt;/span&gt;&lt;/span&gt; is the smallest deployable and usable unit of web resources.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The J2EE standard prescribes a directory structure for web applications that controls both where files should reside and what visibility they will have from the perspective of the visiting web browser. The top-level directory of a web  module is the document root of the application. The document root is  where XHTML pages, client-side classes and archives, and static web  resources, such as images, are stored.&lt;br /&gt;
&lt;br /&gt;
The document root contains a sub directory named WEB-INF. &lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black; font-family: Verdana,sans-serif;&quot;&gt;The    WEB-INF directory is mandatory in a web application.&lt;/span&gt;&lt;/span&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;Although WEB-INF is directly under the document root, it should be considered to be out of the accessible path and is invisible to a visiting web browser. It can contain the following files and directories:&lt;/div&gt;&lt;ul style=&quot;font-family: verdana; text-align: justify;&quot;&gt;&lt;li&gt;classes:  A directory that contains server-side classes: servlets, enterprise  bean class files, utility classes, and JavaBeans components &lt;/li&gt;
&lt;/ul&gt;&lt;ul style=&quot;font-family: verdana; text-align: justify;&quot;&gt;&lt;li&gt;tags: A directory that contains tag files, which are implementations of tag libraries &lt;/li&gt;
&lt;/ul&gt;&lt;ul style=&quot;font-family: verdana; text-align: justify;&quot;&gt;&lt;li&gt;lib: A directory that contains JAR files that contain enterprise  beans, and JAR archives of libraries called by server-side classes &lt;/li&gt;
&lt;/ul&gt;&lt;ul style=&quot;font-family: verdana; text-align: justify;&quot;&gt;&lt;li&gt;Deployment descriptors, such as web.xml (the web application  deployment descriptor) and ejb-jar.xml (an EJB deployment descriptor) &lt;/li&gt;
&lt;/ul&gt;&lt;ul style=&quot;font-family: verdana; text-align: justify;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;The META-INF, this directory is only relevant for use within a war file, where it is mandatory and performs a role very similar to the WEB-INF directory of a non jarred web application. If you create a META-INF directory within your application root the contents will not be directly visible from a visiting web browser.  However because the META-INF directory only has relevance for war files it should not be present in a production (non war) environment and it is common practice to only create it for the purpose of generating the directory structure for a war file &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;font-family: verdana; text-align: justify;&quot;&gt;&lt;br /&gt;
A web  module needs a web.xml file if it uses JavaServer Faces technology, if  it must specify certain kinds of security information, or if you want to  override information specified by web component annotations.&lt;br /&gt;
&lt;br /&gt;
You  can also create application-specific subdirectories (that is, package  directories) in either the document root or the WEB-INF/classes/  directory.&lt;br /&gt;
&lt;br /&gt;
A web module can be deployed as an unpacked  file structure or can be packaged in a JAR file known as a Web Archive  (WAR) file. Because the contents and use of WAR files differ from those  of JAR files,WAR file names use a .war extension. The web module just  described is portable; you can deploy it into any web container that  conforms to the Java Servlet specification.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: verdana; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;b&gt;Web Application Types&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;A web application is a dynamic extension of a web or application server. Web applications are&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; of the following types:&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;text-align: justify;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: 85%;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Presentation-oriented&lt;/span&gt;&lt;/span&gt;: A presentation-oriented web application generates interactive web&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; pages containing various types of markup language (HTML, XHTML, XML, and so on) and&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; dynamic content in response to requests.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-size: 85%; font-weight: bold;&quot;&gt;Service-oriented&lt;/span&gt;: A service-oriented web application implements the endpoint of a web&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; service. Presentation-oriented applications are often clients of service-oriented web&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; applications.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana; font-weight: bold;&quot;&gt;Web Application Life Cycle&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;The process for creating, deploying, and executing a web application can be summarized as&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; follows:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;1. Develop the web component code.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;2. Develop the web application deployment descriptor, if necessary.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;3. Compile the web application components and helper classes referenced by the components.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;4. Optionally, package the application into a deployable unit.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;5. Deploy the application into a web container.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;6. Access a URL that references the web application.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://handlingexception.blogspot.com/feeds/8131218867595884429/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://handlingexception.blogspot.com/2010/09/structure-of-java-ee-application-web.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5741951226829022127/posts/default/8131218867595884429'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5741951226829022127/posts/default/8131218867595884429'/><link rel='alternate' type='text/html' href='http://handlingexception.blogspot.com/2010/09/structure-of-java-ee-application-web.html' title='Structure of a  Java EE  Web Module'/><author><name>Nishi</name><uri>http://www.blogger.com/profile/10373727161583509339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5741951226829022127.post-3160249507534332788</id><published>2010-09-08T15:40:00.011+05:30</published><updated>2010-09-08T15:50:02.850+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Deployment descriptor"/><category scheme="http://www.blogger.com/atom/ns#" term="Java EE"/><category scheme="http://www.blogger.com/atom/ns#" term="Module"/><title type='text'>Structure of a Java EE Application</title><content type='html'>&lt;div style=&quot;font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif; line-height: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;A Java EE module consists of one or more Java EE components for the same container type and, optionally, one component deployment descriptor of that type.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif; line-height: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;line-height: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;Java EE modules are of the following types:&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;font-family: Verdana,sans-serif; text-align: justify;&quot; type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif; line-height: normal;&quot;&gt;      &lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;EJB modules&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;,  which contain      class files for enterprise beans and an EJB  deployment descriptor. EJB      modules are packaged as JAR files with a  .jar extension.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Web modules&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;,  which contain      servlet class files, web files, supporting class  files, GIF and HTML      files, and a web application deployment  descriptor. Web modules are      packaged as JAR files with a .war (web  archive) extension.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif; line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Application      client modules&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;,       which contain class files and an application client deployment  descriptor.      Application client modules are packaged as JAR files  with a .jar      extension.&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;&lt;b&gt;Resource adapter      modules&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;,       which contain all Java interfaces, classes, native libraries, and  other      documentation, along with the resource adapter deployment  descriptor.      Together, these implement the Connector architecture  for a particular EIS.      Resource adapter modules are packaged as JAR  files with an .rar (resource      adapter archive) extension.&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif; line-height: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif; line-height: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;An Enterprise Archive (EAR) file contains Java EE modules and, optionally, deployment descriptors.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif; line-height: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Deployment Descriptor&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif; line-height: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;A &lt;i&gt;deployment descriptor&lt;/i&gt;,  an XML document with an .xml extension, describes the deployment  settings of an application, a module, or a component. Because deployment  descriptor information is declarative, it can be changed without the  need to modify the source code.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;At  runtime, the Java EE server reads the deployment descriptor and acts  upon the application, module, or component accordingly, i.e. with  specific container options, security settings and describes specific  configuration requirements.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif; line-height: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;In Java EE, there are two types of deployment descriptor:&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;font-family: Verdana,sans-serif; text-align: justify;&quot; type=&quot;disc&quot;&gt;&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;Java EE deployment descriptors,      and&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&amp;nbsp;Runtime      deployment descriptors&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;font-family: Verdana,sans-serif; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;font-family: Verdana,sans-serif; line-height: normal; text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;A &lt;i&gt;Java EE deployment descriptor &lt;/i&gt;is  defined by a Java EE specification and can be used to configure  deployment settings on any Java EE compliant implementation. For  example, the &lt;i&gt;web.xml&lt;/i&gt; file is a standard Java EE deployment descriptor, specified in the java servlet &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;specification.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;A &lt;i&gt;runtime deployment descriptor &lt;/i&gt;is  defined by the vendor of each container implementation.It is used to  configure Java EE implementation-specific parameters. For example, the  GlassFish Server runtime deployment descriptor contains such information  as the context root of a web application, as well as GlassFish Server  implementation-specific parameters, such as caching directives. The  GlassFish Server runtime deployment descriptors are named  sun-moduleType.xml and are located in the same META-INF directory as the  Java EE deployment descriptor.&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 12pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://handlingexception.blogspot.com/feeds/3160249507534332788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://handlingexception.blogspot.com/2010/09/java-ee-module-java-ee-module-consists.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5741951226829022127/posts/default/3160249507534332788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5741951226829022127/posts/default/3160249507534332788'/><link rel='alternate' type='text/html' href='http://handlingexception.blogspot.com/2010/09/java-ee-module-java-ee-module-consists.html' title='Structure of a Java EE Application'/><author><name>Nishi</name><uri>http://www.blogger.com/profile/10373727161583509339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5741951226829022127.post-1301696201186920686</id><published>2010-09-07T10:20:00.004+05:30</published><updated>2010-09-08T15:20:03.268+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="component"/><category scheme="http://www.blogger.com/atom/ns#" term="container"/><category scheme="http://www.blogger.com/atom/ns#" term="Introduction"/><category scheme="http://www.blogger.com/atom/ns#" term="jargon"/><category scheme="http://www.blogger.com/atom/ns#" term="Java EE"/><title type='text'>Introduction to Java EE 6</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The aim of Java EE platform is to provide developer with a powerful set of APIs while shortening development time, reducing application complexity and improving application performance.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-style: italic;&quot;&gt;New technologies&lt;/span&gt;, including the following are available in Java EE 6:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; Java API for RESTful Web Services (JAX-RS)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; Managed Beans&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; Contexts andDependency Injection for the Java EE Platform (JSR 299),        informally known as CDI&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; Dependency Injection for Java (JSR 330)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; Bean Validation (JSR 303)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; Java Authentication Service Provider Interface for Containers (JASPIC)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Also there are new features added Enterprise JavaBeans (EJB) components, servlets and Java Server Faces components. &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Java EE Application Model&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The Java EE application model defines an architecture for implementing services as multitier applications.This model partitions the work needed to implement a multitier service into the following parts:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;  The business and presentation logic to be implemented by the developer&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;  The standard system services provided by the Java EE platform&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The developer can rely on the platform to provide solutions for the hard systems-level problems of developing a multitier service.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Java EE multitiered applications are generally considered to be three-tiered applications because they are distributed over three locations: client machines, the Java EE server machine, and the database or legacy machines at the back end.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Client-tier components run on the client machine.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Web-tier components run on the Java EE server.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Business-tier components run on the Java EE server.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Enterprise information system (EIS)-tier software runs on the EIS server.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Java EE Components&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Java EE applications are made up of components.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;A &lt;span style=&quot;font-style: italic;&quot;&gt;Java EE Component&lt;/span&gt; is a&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; self contained functional software unit that is assembled into a Java EE application with its related classes and files and that &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: 100%;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; communicates with other components.&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;The Java EE specification defines the following Java EE components.&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Application/web clients and applets are components that run on the client.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Java Servlet, JavaServer Faces, and JavaServer Pages (JSP) technology components are web&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; components that run on the server.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt;Enterprise JavaBeans (EJB) components (enterprise beans) are business components that&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; run on the server.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;Component based architecture makes Java EE applications easy to write because business logic is organized into reusable components.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: verdana; font-weight: bold;&quot;&gt;Java EE Container&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: verdana; font-style: italic;&quot;&gt;Containers&lt;/span&gt;&lt;span style=&quot;font-family: verdana;&quot;&gt; are the interface between a component and the low-level platform-specific functionality that supports the component.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;Before it can be executed, a web, enterprise bean, or application client component must be assembled into a Java EE module and deployed into its container.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;The assembly process involves specifying container settings for each component in the Java EE application and for the Java EE application itself. Container settings customize the underlying support provided by the Java EE server, including such services as security, transaction management, JavaNaming and Directory Interface (JNDI) API lookups, and remote connectivity.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;The container also manages nonconfigurable services, such as enterprise bean and servlet life cycles, database connection resource pooling, data persistence, and access to the Java EE platform APIs&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: verdana; font-weight: bold;&quot;&gt;Container Types&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: verdana;&quot;&gt;The deployment process installs Java EE application components in the Java EE containers.&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;font-family: verdana;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: 85%;&quot;&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;Java EE server&lt;/span&gt;&lt;/span&gt;: The runtime portion of a Java EE product. A Java EE server provides EJB and web containers.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 85%;&quot;&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;Enterprise JavaBeans (EJB) container&lt;/span&gt;&lt;/span&gt;:Manages the execution of enterprise beans for Java EE applications. Enterprise beans and their container run on the Java EE server.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 85%;&quot;&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;Web container&lt;/span&gt;&lt;/span&gt;:Manages the execution of web pages, servlets, and some EJB components for Java EE applications. Web components and their container run on the Java EE server.&lt;br /&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 85%;&quot;&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;Application client container&lt;/span&gt;&lt;/span&gt;:Manages the execution of application client components. Application clients and their container run on the client.&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: 85%;&quot;&gt;&lt;span style=&quot;font-style: italic; font-weight: bold;&quot;&gt;Applet container&lt;/span&gt;&lt;/span&gt;:Manages the execution of applets. Consists of a web browser and Java Plug-in running on the client together.&lt;/li&gt;
&lt;/ul&gt;&lt;ul style=&quot;font-family: verdana;&quot;&gt;&lt;/ul&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://handlingexception.blogspot.com/feeds/1301696201186920686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://handlingexception.blogspot.com/2010/09/introduction-to-java-ee-6.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5741951226829022127/posts/default/1301696201186920686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5741951226829022127/posts/default/1301696201186920686'/><link rel='alternate' type='text/html' href='http://handlingexception.blogspot.com/2010/09/introduction-to-java-ee-6.html' title='Introduction to Java EE 6'/><author><name>Nishi</name><uri>http://www.blogger.com/profile/10373727161583509339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5741951226829022127.post-4222133444727132110</id><published>2010-09-07T10:11:00.000+05:30</published><updated>2010-09-08T11:32:08.354+05:30</updated><title type='text'>Hello</title><content type='html'>&lt;span style=&quot;;font-family:georgia;font-size:85%;&quot;  &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;;font-family:georgia;font-size:100%;&quot;  &gt;&lt;span style=&quot;font-family:verdana;&quot;&gt;While   I was on a learning curve trying to learn and keep up with the various   technologies and frameworks related to Java, I needed to scan and read   different articles and tutorials to fulfill my curiosity &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:lucida grande;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-family:verdana;&quot;&gt;and then another scores of pages when I had some bug/error in my application.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:lucida grande;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-family:verdana;&quot;&gt;This blog is for someone like me who wants to learn and wants a good source. I am no master of any of the technology, but i wish this helps in your journey.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family:lucida grande;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;span style=&quot;font-family:verdana;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://handlingexception.blogspot.com/feeds/4222133444727132110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://handlingexception.blogspot.com/2010/09/hello.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5741951226829022127/posts/default/4222133444727132110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5741951226829022127/posts/default/4222133444727132110'/><link rel='alternate' type='text/html' href='http://handlingexception.blogspot.com/2010/09/hello.html' title='Hello'/><author><name>Nishi</name><uri>http://www.blogger.com/profile/10373727161583509339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>