<?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, 30 Jul 2010 06:00:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.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><a href="http://www.bestjavainterviewquestions.com/servlet-session-examples/" title="Servlets Session Examples"><img src="Array" alt="Servlets Session Examples" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/what-is-difference-between-accessing-the-table-single-column-and-accessing-the-tabe-with-multiple-column-key/" title="What is difference between accessing the table single column and accessing the tabe with multiple column key"><img src="Array" alt="What is difference between accessing the table single column and accessing the tabe with multiple column key" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/define-session-bean-and-entity-bean/" title="Define Session Bean and Entity Bean"><img src="Array" alt="Define Session Bean and Entity Bean" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/jsp-example-file-uploading/" title="Jsp Example: File Uploading"><img src="Array" alt="Jsp Example: File Uploading" /></a></li><li><a href="http://www.bestjavainterviewquestions.com/explain-java-comments/" title="Explain Java Comments"><img src="Array" alt="Explain Java Comments" /></a></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>
