<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Java Interview Questions &#187; define application scope</title>
	<atom:link href="http://www.bestjavainterviewquestions.com/category/jsp-inteview-questions/define-application-scope/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bestjavainterviewquestions.com</link>
	<description>Java Interview Questions &#124; Core Java Interview Questions &#124; Advanced Java Interview Questions &#124; EJB Interview Questions &#124; J2EE Interview Questions &#124; Hibernate Interview Questions</description>
	<lastBuildDate>Fri, 03 Feb 2012 10:23:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>when do use application scope</title>
		<link>http://www.bestjavainterviewquestions.com/when-do-use-application-scope/</link>
		<comments>http://www.bestjavainterviewquestions.com/when-do-use-application-scope/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 17:48:55 +0000</pubDate>
		<dc:creator>Ramakrishna</dc:creator>
				<category><![CDATA[define application scope]]></category>
		<category><![CDATA[application scope]]></category>

		<guid isPermaLink="false">http://www.bestjavainterviewquestions.com/?p=445</guid>
		<description><![CDATA[Application Scope If a single Java Bean Object that holds nothing specific to the client has to be used while processing multiple requests then we must use scope=&#8221;application&#8221; For every application there will be several application preferences/setting we can store the application preferences as part of a table in DataBase as part of an XML [...]]]></description>
			<content:encoded><![CDATA[<p><strong><span style="text-decoration: underline;">Application Scope</span></strong></p>
<p>If a single Java Bean Object that holds nothing specific to the client has to be used while processing multiple requests then we must use scope=&#8221;application&#8221;</p>
<p>For every application there will be several application preferences/setting we can store the application preferences as part of a table in DataBase as part of an XML file/as part of a flat file.</p>
<p>We can use an xml as shown below to hold the information about the application preference</p>
<p><strong><em>Note:</em></strong> Storing the object inside the <em>servletcontext</em> is an application scope</p>
<p><em>Syntax:</em></p>
<p>&lt;host-app&gt;</p>
<p>&lt;pref-name&gt;hname&lt;/pref-name&gt;</p>
<p>&lt;pref-value&gt;Hospitalone&lt;/pref-value&gt;</p>
<p>&lt;pref-name&gt;address&lt;/pref-name&gt;</p>
<p>&lt;pref-value&gt;Srnagar&lt;/pref-value&gt;</p>
<p>&lt;pref-name&gt;bgcolor&lt;/pref-name&gt;</p>
<p>&lt;pref-value&gt;blue&lt;/pref-value&gt;</p>
<p>&lt;pref-name&gt;logo&lt;/pref-name&gt;</p>
<p>&lt;pref-value&gt;hlogo.jsp&lt;/pref-value&gt;</p>
<p>&lt;/hosp-app&gt;</p>
<p>save the above code with the extension<strong> app-conf.xml</strong></p>
<p>The above data is not specific to the client and is required while processing multiple request.</p>
<h2  class="related_post_title">Random Posts</h2><ul class="related_post"><li>March 20, 2009 -- <a href="http://www.bestjavainterviewquestions.com/life-cycle-of-stateless-session-bean/" title="Life Cycle of stateless session bean">Life Cycle of stateless session bean</a> (0)</li><li>December 16, 2008 -- <a href="http://www.bestjavainterviewquestions.com/explain-interfacedefine/" title="Explain Interface?Define ">Explain Interface?Define </a> (0)</li><li>April 4, 2009 -- <a href="http://www.bestjavainterviewquestions.com/ejb-interview-questions-2/" title="EJB Interview questions">EJB Interview questions</a> (0)</li><li>September 23, 2008 -- <a href="http://www.bestjavainterviewquestions.com/java-package/" title="Java Package">Java Package</a> (0)</li><li>December 12, 2008 -- <a href="http://www.bestjavainterviewquestions.com/the-url-class/" title="The URL Class">The URL Class</a> (0)</li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.bestjavainterviewquestions.com/when-do-use-application-scope/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

