<?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>JavaBeat &#187; JavaBeat</title>
	<atom:link href="http://www.javabeat.net/author/javabeat/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javabeat.net</link>
	<description>Java Technology News</description>
	<lastBuildDate>Mon, 13 May 2013 20:10:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>NetBeans IDE 7.0 Final available for download!</title>
		<link>http://www.javabeat.net/2011/06/netbeans-ide-7-0-final-available-for-download/</link>
		<comments>http://www.javabeat.net/2011/06/netbeans-ide-7-0-final-available-for-download/#comments</comments>
		<pubDate>Sat, 11 Jun 2011 13:46:31 +0000</pubDate>
		<dc:creator>JavaBeat</dc:creator>
				<category><![CDATA[NetBeans]]></category>

		<guid isPermaLink="false">http://www.javabeat.net/examples/?p=301</guid>
		<description><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><p>NetBeans IDE 7.0 NetBeans™ IDE 7.0 introduces language support for coding to the proposed Java SE 7 specification with the JDK 7 developer preview. Developers can now take advantage of the new language features from Project Coin /JSR 334, with editor support for code completion, hints, and in specific cases converting existing Java SE 6 [...]</p>]]></description>
				<content:encoded><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><div class="wpInsert wpInsertInPostAd wpInsertLeft" style="float: left; margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Rect */
google_ad_slot = "9976259118";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><a id="dd_start"></a><h1>NetBeans IDE 7.0</h1>
<p>NetBeans™ IDE 7.0 introduces language support for coding to the proposed Java SE 7 specification with the JDK 7 developer preview. Developers can now take advantage of the new language features from Project Coin /JSR 334, with editor support for code completion, hints, and in specific cases converting existing Java SE 6 based code to use the new Java SE 7 based syntax. </p>
<p>The release also provides enhanced integration with the Oracle WebLogic server as well as support for Oracle Database and GlassFish 3.1. The Oracle WebLogic server integration enhancements include fast turnaround when redeploying applications; deploy on save; datasource management; server library configuration; the ability to explore deployed applications and resources, and to view server logs and the admin console from within the IDE. </p>
<p>Additional highlights include Maven 3 and HTML5 editing support; a new GridBagLayout designer for improved Swing GUI development; enhancements to the Java editor, and more. </p><div class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Middle-Med-Rect */
google_ad_slot = "7805667846";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<p>NetBeans IDE 7.0 is available in English, Brazilian Portuguese, Japanese, Russian, and Simplified Chinese. </p>
<h3>Release Highlights</h3>
<h3>JDK 7</h3>
<ul>
<li>Project Coin support</li>
<li>Editor enhancements: Code completion, hints</li>
</ul>
<h3>WebLogic Server</h3>
<ul>
<li>Streamlined and faster deployment to WebLogic</li>
<li>New server runtime node displaying deployed applications and resources</li>
</ul>
<h3>Oracle Database</h3>
<ul>
<li>Simplified connection wizard</li>
<li>Guided installation to JDBC driver</li>
</ul>
<h3>GlassFish</h3>
<ul>
<li>GlassFish 3.1 support</li>
<li>Domain restart and log viewer for remote GlassFish</li>
</ul>
<h3>Java</h3>
<ul>
<li>Maven 3 support</li>
<li>JUnit 4.8.2 integration and various JUnit improvements</li>
<li>New improved visual customizer for GridBagLayout</li>
</ul>
<h3>Java EE</h3>
<ul>
<li>Improved support for CDI, REST services and Java Persistence</li>
<li>Improved editing for Expression Language in JSF, including code completion, refactoring and hints</li>
</ul>
<h3>Web Languages</h3>
<ul>
<li>HTML5 editing support</li>
<li>JSON formatter</li>
</ul>
<h3>PHP</h3>
<ul>
<li>Generate PhpDoc</li>
<li>Rename refactoring, Safe Delete Refactoring</li>
</ul>
<h3>C/C++</h3>
<ul>
<li>Easy import of project from user&#8217;s existing binary</li>
<li>New Project type where user&#8217;s source files are located on remote system</li>
</ul>
<h3>NetBeans Platform</h3>
<ul>
<li>Annotations for generating Action registrations in the layer</li>
<li>Performance enhancements &amp; tight integration with Profiler</li>
</ul>
<h3>General</h3>
<ul>
<li>Word wrap in Editor</li>
<li>Enhanced Profiler integration</li>
</ul>
<ul>
<li><a href="http://netbeans.org/downloads/index.html" target="_blank">NetBeans 7.0 Download</a></li>
</ul>
<div class='dd_outer'><div class='dd_inner'><div id='dd_ajax_float'><div class='dd_button_v'><script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like href="http%3A%2F%2Fwww.javabeat.net%2Fauthor%2Fjavabeat%2Ffeed%2F" send="false" show_faces="false"  layout="box_count" width="50"  ></fb:like></div><div style='clear:left'></div><div class='dd_button_v'><script type='text/javascript' src='https://apis.google.com/js/plusone.js'></script><g:plusone size='tall' href='http://www.javabeat.net/author/javabeat/feed/'></g:plusone></div><div style='clear:left'></div><div class='dd_button_v'><a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.javabeat.net/author/javabeat/feed/" data-count="vertical" data-text="" data-via="javabeat" ></a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div><div style='clear:left'></div><div class='dd_button_extra_v'><script type="text/javascript">jQuery(document).load(function(){ stLight.options({publisher:'bab47279-62c9-46af-addc-79fd1fe8fee0'}); });</script><div class="st_email_custom"><span id='dd_email_text'>email</span></div></div><div style='clear:left'></div><div class='dd_button_extra_v'><div id='dd_print_button'><span id='dd_print_text'><a href='javascript:window:print()'>print</a></span></div></div><div style='clear:left'></div></div></div></div><script type="text/javascript">var dd_offset_from_content = 44; var dd_top_offset_from_content = 0;</script><script type="text/javascript" src="http://www.javabeat.net/wp-content/plugins/digg-digg//js/diggdigg-floating-bar.js?ver=5.3.0"></script><div class="wpInsert wpInsertInPostAd wpInsertBelow" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* JB-Footer-LU 468x15 */
google_ad_slot = "8789107210";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>]]></content:encoded>
			<wfw:commentRss>http://www.javabeat.net/2011/06/netbeans-ide-7-0-final-available-for-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enterprise Push Server in ICEFaces</title>
		<link>http://www.javabeat.net/2011/06/enterprise-push-server-in-icefaces/</link>
		<comments>http://www.javabeat.net/2011/06/enterprise-push-server-in-icefaces/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 13:45:56 +0000</pubDate>
		<dc:creator>JavaBeat</dc:creator>
				<category><![CDATA[JSF]]></category>

		<guid isPermaLink="false">http://www.javabeat.net/examples/?p=299</guid>
		<description><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><p>Enterprise Push Server in ICEFaces What is Enterprise Push Server? In ICEfaces EE 2, the Enterprise Push Server (EPS) is built to manage singleAjax Push blocking connection(s) with the client browser and share it with any number of deployed ICEfaces applications and portlets, in both stand-alone and clustered deployments. The Enterprise Push Server delivers key [...]</p>]]></description>
				<content:encoded><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><div class="wpInsert wpInsertInPostAd wpInsertLeft" style="float: left; margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Rect */
google_ad_slot = "9976259118";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><h1>Enterprise Push Server in ICEFaces</h1>
<h2>What is Enterprise Push Server?</h2>
<p>In ICEfaces EE 2, the Enterprise Push Server (EPS) is built to manage singleAjax Push blocking connection(s) with the client browser and share it with any number of deployed ICEfaces applications and portlets, in both stand-alone and clustered deployments. The Enterprise Push Server delivers key additional features targeted at large-scale and high-availability enterprise deployments. Specifically, the Enterprise Push Servers:</p>
<ul>
<li>Integrates with major open source and commercial application servers to provide high-scalability and fail-over support for clustered Ajax Push-enabled ICEfaces applications.</li>
<li>Provides distributed management of Push blocking connection to any number of deployed ICEfaces applications and portlets in both a stand-alone and clustered environments.</li>
<li>Designed to Load-balance for failover of blocking push connections.</li>
<li>Supports Servlet 3.0 Asynchronous Request Processing (ARP) integration for thread-level scalability.</li>
</ul>
<p>Enterprise Push Server is required for deploying multiple Ajax Push applications to the same domain. It delivers push server capabilities and key features targeted at enterprise deployments in either stand-alone or cluster deployment environments.</p><div class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Middle-Med-Rect */
google_ad_slot = "7805667846";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<h2>5 Things to Know About Enterprise Push Server </h2>
<ol>
<li>Enterprise Push Server enables the delivery of collaborative rich web applications through Ajax Push.</li>
<li>It integrates with major open source and commercial application servers to provide high-scalability and fail-over support for clustered Ajax Push-enabled  ICEfaces applications.</li>
<li>Provides distributed management of Push blocking connection to any number of deployed ICEfaces applications and portlets in both a stand-alone and clustered environments.</li>
<li>Designed to Load-balance for failover of blocking push connections.</li>
<li>Supports Asynchronous Request Processing (ARP) integration for thread-level scalability.</li>
</ol>
<p><a href="http://www.icefaces.org/main/ajax-java/enterprise-push-server.iface" target="_blank">More Details</a></p>
<div class="wpInsert wpInsertInPostAd wpInsertBelow" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* JB-Footer-LU 468x15 */
google_ad_slot = "8789107210";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>]]></content:encoded>
			<wfw:commentRss>http://www.javabeat.net/2011/06/enterprise-push-server-in-icefaces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ICEfaces EE 2.0 is Now Available!</title>
		<link>http://www.javabeat.net/2011/06/icefaces-ee-2-0-is-now-available/</link>
		<comments>http://www.javabeat.net/2011/06/icefaces-ee-2-0-is-now-available/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 13:44:45 +0000</pubDate>
		<dc:creator>JavaBeat</dc:creator>
				<category><![CDATA[JSF]]></category>

		<guid isPermaLink="false">http://www.javabeat.net/examples/?p=297</guid>
		<description><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><p>ICEfaces EE 2.0 is Now Available! ICEfaces Enterprise Edition (EE) 2.0 is a JSF 2 ready, enterprise-grade development framework, designed to allow enterprise application developers to quickly design, test and deploy rich collaborative web applications. ICEfaces EE 2.0 provides enterprise-grade features and capabilities not available in ICEfaces 2 open-source releases. It includes additional enterprise technologies, [...]</p>]]></description>
				<content:encoded><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><div class="wpInsert wpInsertInPostAd wpInsertLeft" style="float: left; margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Rect */
google_ad_slot = "9976259118";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><h1>ICEfaces EE 2.0 is Now Available!</h1>
<p>ICEfaces Enterprise Edition (EE) 2.0 is a JSF 2 ready, enterprise-grade development framework, designed to allow enterprise application developers to quickly design, test and deploy rich collaborative web applications.</p>
<p>ICEfaces EE 2.0 provides enterprise-grade features and capabilities not available in ICEfaces 2 open-source releases. It includes additional enterprise technologies, features, and advanced documentation designed to simplify and enhance your ICEfaces project lifecycle from development and testing, to deployment.</p>
<p>ICEfaces EE 2.0 is certified and fully tested against an extensive matrix of open source and commercial Java EE technologies. Key features of ICEfaces EE 2.0 include:</p>
<ul>
<li>Certified Code-base</li>
<li>Commercial Technology Integrations</li>
<li>Enterprise Components</li>
<li>Testing Resources </li>
<li>Enterprise Push Server (EPS) </li>
<li>Enterprise Deployment Guides</li>
<li>Enterprise-Level Support Options</li>
</ul>
<p>ICEfaces 2.0.1 is an official maintenance release featuring over 110 fixes and improvements. </p><div class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Middle-Med-Rect */
google_ad_slot = "7805667846";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<h3>Notable changes included in this release are:</h3>
<ul>
<li>New Supported Platforms?</li>
<li>- Chrome 10, Firefox 4.0, IE 9</li>
<li>- GlassFish 3.1, JBoss 6.0 and Liferay Portal 5 and 6</li>
<li>- CDI / Weld</li>
<li>Optimized JavaScript for the ICEfaces Components</li>
<li>Faster Page Loading</li>
<li>Mojarra JSF 2.1 and associated support updates</li>
<li>Optimized Window Scope initialization</li>
<li>Various Single Submit Improvements</li>
<li>Updated Tutorials &amp; Sample Applications</li>
</ul>
<h3>ICEfaces 2.0 Training</h3>
<p>ICEsoft offers online training options to fit your specific needs. ICEfaces Training is developer led using experienced ICEfaces developers with several years of JSF and ICEfaces development experience. All our courses include hands-on exercises and labs to ensure knowledge transfer.</p>
<h4>Introduction to ICEfaces and JSF (updated to ICEfaces 2 and JSF 2)</h4>
<p>This 9 hour online course provides overview into Java Server Faces (JSF) and teaches the basics of developing Rich Enterprise Applications using ICEfaces and JSF. Students will be introduced to the MVC (Model View Controller) architecture of JSF, event-handling, data binding and validation. The course walks attendees through the ICEfaces architecture, component library and unique features such as Ajax push and page level design. Students will learn how to install, and configure their local environment and will develop and deploy a basic ICEfaces application.</p>
<ul>
<li>Target Audience: JSP and Java developers.</li>
<li>Prerequisites: Prior experience in Java programming.</li>
<li>Requirements: Broadband Internet connection. Telephone or microphone/headset if using VOIP. Eclipse IDE.</li>
<li>Course Duration: 9 hrs (3/3/3).</li>
<li>Price: $450 per person.</li>
<li><a href="http://www.icefaces.org/main/training/online.iface" target="_blank">More Details</a></li>
</ul>
<p><a href="http://www.icefaces.org/main/downloads/os-downloads.iface" target="_blank">More Details for IceFaces 2.0</a></p>
<div class="wpInsert wpInsertInPostAd wpInsertBelow" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* JB-Footer-LU 468x15 */
google_ad_slot = "8789107210";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>]]></content:encoded>
			<wfw:commentRss>http://www.javabeat.net/2011/06/icefaces-ee-2-0-is-now-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ICEfaces in Portals with PortletFaces Bridge</title>
		<link>http://www.javabeat.net/2011/06/icefaces-in-portals-with-portletfaces-bridge/</link>
		<comments>http://www.javabeat.net/2011/06/icefaces-in-portals-with-portletfaces-bridge/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 13:47:04 +0000</pubDate>
		<dc:creator>JavaBeat</dc:creator>
				<category><![CDATA[JSF]]></category>

		<guid isPermaLink="false">http://www.javabeat.net/examples/?p=303</guid>
		<description><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><p>ICEfaces in Portals with PortletFaces Bridge ICEfaces 2 uses the open source PortletFaces Bridge project to provide a much improved portal development experience. The PortletFaces Bridge is based in part on the JSR 329 standard, and provides advanced support for JSF 2.0 Portal applications. Using the improvements in both JSF 2 and Portlet 2, the [...]</p>]]></description>
				<content:encoded><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><div class="wpInsert wpInsertInPostAd wpInsertLeft" style="float: left; margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Rect */
google_ad_slot = "9976259118";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><h1>ICEfaces in Portals with PortletFaces Bridge</h1>
<p>ICEfaces 2 uses the open source PortletFaces Bridge project to provide a much improved portal development experience. The PortletFaces Bridge is based in part on the JSR 329 standard, and provides advanced support for JSF 2.0 Portal applications. Using the improvements in both JSF 2 and Portlet 2, the PortletFaces Bridge now directs all Ajax requests to ICEfaces without bypassing the portlet container while maintaing a rich UI experience by avoiding full page renders.</p>
<p>With the PortletFaces Bridge, ICEfaces Ajax portal integration adheres to the Portlet 2.0 specification and supports most of the JSR 286 Portlet 2.0 API. </p>
<p>The PortletFaces Bridge is tested and shipped with the ICEfaces 2 distribution and can be used to develop portlet applications with ICEfaces.</p>
<h2>ICEfaces 1.x Brings Ajax and JSF to Portals</h2>
<p>ICEfaces 1.x introduces easy, transparent use of Ajax in JavaServer Faces (JSF) applications. ICEfaces 1.x provides the same &#8220;Ajax over JSF&#8221; benefits to portlet developers by providing a simple, generic mechanism for bridging the portlet and JSF lifecycles. By using ICEfaces 1.x, developers can build JSF portlets with automatic support for Ajax, providing a rich user experience where portlets can be smoothly updated without disruption to other portlets on the page. In addition, using Ajax Push, an action in one portlet can be used to trigger changes and updates in other portlets, allowing for a form of Inter-Portlet Communication (IPC) that was unavailable in the Portlet 1.x API. In addition, all these features are available and supported across several leading portal platforms.</p><div class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Middle-Med-Rect */
google_ad_slot = "7805667846";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<h2>ICEfaces 2 and the PortletFaces Bridge</h2>
<p>The advent of the Portlet 2.x and JSF 2.x specifications ushered in a host of new features that were previously unavailable in the older portlet and JSF implementations. JSF 2.x now provides native support for Ajax and Portlet 2.x now supports IPC. There are also standard specifications for JSF portal bridges which are designed to be transferrable across portal platforms.</p>
<p>ICEfaces 2 now ties all of these together for an even better portlet development experience. ICEfaces 2 uses the PortletFaces Bridge, a portlet bridge based in part on theJSR-329 standard, including advanced support for JSF 2.0, to provide a much improved portal development experience. The PortletFaces Bridge cleanly isolates the work of meshing the Portlet 2 API and lifecycle with the JSF 2 API and lifecycle.</p>
<h2><a href="http://www.icefaces.org/main/ajax-java/portals.iface" target="_blank">Read More Details</a></h2>
<div class="wpInsert wpInsertInPostAd wpInsertBelow" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* JB-Footer-LU 468x15 */
google_ad_slot = "8789107210";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>]]></content:encoded>
			<wfw:commentRss>http://www.javabeat.net/2011/06/icefaces-in-portals-with-portletfaces-bridge/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Core Tags in JSTL</title>
		<link>http://www.javabeat.net/2011/05/core-tags-in-jstl/</link>
		<comments>http://www.javabeat.net/2011/05/core-tags-in-jstl/#comments</comments>
		<pubDate>Sun, 22 May 2011 00:39:47 +0000</pubDate>
		<dc:creator>JavaBeat</dc:creator>
				<category><![CDATA[JSP]]></category>

		<guid isPermaLink="false">http://www.javabeat.net/examples/?p=322</guid>
		<description><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><p>[ In the second part of this tutorial on JSTL, the author explains how the tags in the core-group can be used in JSP pages, with a number of simpleexamples.] We are now ready toexperiment with all the tags in the ‘core’ library. The core tags have the following uniform‘uri’. ‘http://java.sun.com/jstl/core&#039; =============================== ( However, in [...]</p>]]></description>
				<content:encoded><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><div class="wpInsert wpInsertInPostAd wpInsertLeft" style="float: left; margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Rect */
google_ad_slot = "9976259118";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p class="MsoNormal"><span class="GramE"><span>[</span><span> In</span></span><span> the second part of this<br />
tutorial on JSTL, the author explains how the tags in the core-group can be<br />
used in JSP pages, with a number of simple<span></span>examples.]</span></p>
<p class="MsoNormal"><span><span></span></span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span><span></span>We are now ready <span class="GramE">to<span></span>experiment</span> with all the tags in the<br />
‘core’ library. The core tags have the following <span class="GramE">uniform<span></span>‘<span class="SpellE">uri</span>’</span>.</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>‘<span class="GramE"><b>http</b></span><b>://<span class="SpellE">java.sun.com/jstl/core</span>&#039;</b></span></p>
<p class="MsoNormal"><b><span>===============================</span></b></p>
<p class="MsoNormal"><span class="GramE"><span>( However</span></span><span>, in the book by Hans<br />
Bergsten<span></span><span class="SpellE">titled,&quot;Java</span><br />
Server Pages&quot; ( third edition), (<span class="SpellE">OReilly</span> pub)the<br />
<span class="SpellE">uri</span> is consistently given as :</span></p>
<p class="MsoNormal"><span>&#039;<span class="GramE">http</span>://<span class="SpellE">java.sun.com/<b>jsp/</b>jstl/core&#039;.It</span></span><span> looks as if there has been some<br />
change in specification and grammar, after it was published.</span></p>
<p class="MsoNormal"><span>This<br />
appears to be wrong <span class="GramE">as<span></span>the</span> server threw<span></span><span class="SpellE">exception.The</span> correct <span class="SpellE">uri</span> is :</span></p>
<div>
<p class="MsoNormal" style="border: medium none;padding: 0in;text-align: justify"><span>&#039;<span class="GramE"><b>http</b></span><b>://<span class="SpellE">java.sun.com/jstl/core</span>&#039;</b>.)</span></p>
</div>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>The<br />
prefix <span class="GramE">is<span></span>‘c</span>:’</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span><span></span>The following tags are available in the<br />
‘core’ library.</span></p>
<p class="MsoNormal"><span class="GramE"><span>( Remember</span></span><span> them as a dozen!).</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span><span></span><b><span></span>&lt;<span class="SpellE">c<span class="GramE">:set</span></span></b></span></p>
<p class="MsoNormal"><b><span><span></span>&lt;<span class="SpellE">c<span class="GramE"> <img src='http://www.javabeat.net/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> ut</span></span></span></b></p>
<p class="MsoNormal"><b><span><span></span>&lt;<span class="SpellE">c<span class="GramE">:if</span></span><span></span>test= “<span></span></span></b></p>
<p class="MsoNormal"><b><span><span></span>&lt;<span class="SpellE">c<span class="GramE">:choose</span></span><span></span>,<span></span>&lt;<span class="SpellE">c:when</span> ,<span></span>&lt;<span class="SpellE">c:otherwise</span></span></b></p>
<p class="MsoNormal"><b><span><span></span>&lt;<span class="SpellE">c<span class="GramE">:forEach</span></span></span></b></p>
<p class="MsoNormal"><b><span><span></span>&lt;<span class="SpellE">c<span class="GramE">:forTokens</span></span></span></b></p>
<p class="MsoNormal"><b><span><span></span>&lt;<span class="SpellE">c<span class="GramE">:import</span></span></span></b></p>
<p class="MsoNormal"><b><span><span></span>&lt;<span class="SpellE">c<span class="GramE">:url</span></span></span></b></p>
<p class="MsoNormal"><b><span><span></span>&lt;<span class="SpellE">c<span class="GramE">:redirect</span></span></span></b></p>
<p class="MsoNormal"><b><span><span></span>&lt;<span class="SpellE">c<span class="GramE">:param</span></span></span></b></p>
<p class="MsoNormal"><span><span></span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p class="MsoNormal"><span>We<br />
will now see simplest illustrations for the above <span class="SpellE">tags.There</span><br />
are a dozen demos, to bring out the features of each of these tags.</span></p>
<p class="MsoNormal"><span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<span></span></span></p>
<p class="MsoNormal"><span><span></span></span></p>
<p class="MsoNormal"><span class="GramE"><b><span>demo1.jsp<span></span></span></b><span>uses</span></span><span><span></span><b>&lt;<span class="SpellE">c:set</span></b>&amp;<br />
<b><span></span>&lt;<span class="SpellE">c:out</span><span></span></b>tags.</span></p>
<p class="MsoNormal"><span class="GramE"><span>:We</span></span><span> create demo1.jsp<span></span>as:</span></p>
<p class="MsoNormal"><span>e:tomcat5webappsrootdemo1.jsp</span></p>
<p class="MsoNormal"><span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p class="MsoNormal"><span>//<span></span><b>demo1.jsp</b></span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>&lt;%@<br />
page <span class="SpellE">contentType</span>=&quot;text/html&quot; %&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>&lt;%@<br />
<span class="SpellE">taglib</span><span></span>prefix=&quot;c&quot;<span></span><span class="SpellE"><b>uri</b></span><b>=&quot;http://java.sun.com/jstl/core<span class="GramE">&quot;<span></span>%</span>&gt;</b></span></p>
<p class="MsoNormal"><b><span></span></b></p>
<p class="MsoNormal"><span>&lt;<span class="GramE">html</span>&gt;</span></p>
<p class="MsoNormal"><span>&lt;body<span></span><span class="SpellE">bgcolor</span>=<span class="SpellE">lightblue</span>&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span><span></span>&lt;form<span></span>method=<span class="GramE">post<span></span>action</span>=&quot;demo1.jsp&quot;&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span><span></span>NAME &lt;<span class="GramE">input<span></span>type</span>=text<span></span>name=&quot;text1&quot;&gt;&lt;<span class="SpellE">br</span>&gt;</span></p>
<p class="MsoNormal"><span><span></span>PLACE&lt;<span class="GramE">input<span></span>type</span>=text<span></span>name=&quot;text2&quot;&gt;&lt;<span class="SpellE">br</span>&gt;</span></p>
<p class="MsoNormal"><span><span></span>&lt;input type=submit&gt;</span></p>
<p class="MsoNormal"><span><span></span>&lt;/form&gt; </span></p>
<p class="MsoNormal"><span><span></span></span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">NAME<b>:</b></span><b>&lt;<span class="SpellE">c:out</span></b><span></span>value<b>=&quot;${param.text1}&quot;</b><span></span>/&gt;&lt;<span class="SpellE">br</span>&gt;</span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">PLACE<b>:</b></span><b>&lt;<span class="SpellE">c:out</span><span></span></b>value<b>=&quot;${param.text2}&quot;<span></span></b>/&gt;</span></p>
<p class="MsoNormal"><span>&lt;/body&gt;</span></p>
<div>
<div style="border-style: none none double;border-color: -moz-use-text-color -moz-use-text-color windowtext;border-width: medium medium 2.25pt;padding: 0in 0in 1pt">
<p class="MsoNormal" style="border: medium none;padding: 0in;text-align: justify"><span>&lt;/html&gt;</span></p>
<p class="MsoNormal" style="border: medium none;padding: 0in;text-align: justify"><span></span></p>
</div>
</div>
<p class="MsoNormal"><span>In all the<br />
previous examples, we invoked the JSP file through a <span class="GramE">html<span></span>file</span>. But, in demo1.jsp, we <span class="GramE">are<span></span>posting</span> the page<br />
to itself.( in asp.net style!).<span class="GramE">( but</span> there is no<br />
&#039;retention of data&#039; , unlike asp.net).</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>We start<br />
Tomcat5, and type the <span class="SpellE">url</span><span class="GramE">as :</span></span></p>
<p class="MsoNormal"><span><span></span>‘<span class="GramE">http</span>://localhost:8080/demo1.jsp’.<span></span><span class="GramE">in</span> the <span class="SpellE">browser.We</span> get a form with two text boxes and a submit<br />
button. We fill up the textboxes with ‘name’ and ‘place’ and <span class="SpellE">submit.The</span> demo1.jsp executes and displays <span class="GramE">the<span></span>values</span> entered by<br />
the <span class="SpellE">user.due</span> to the JSTL tags </span></p>
<p class="MsoNormal"><b><span>&lt;<span class="SpellE">c<span class="GramE"> <img src='http://www.javabeat.net/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> ut</span></span><span></span>value=”${param.text1}</span></b><span><span></span>/&gt;<span></span>etc.</span></p>
<p class="MsoNormal"><span>That is<br />
about our first and introductory example.</span></p>
<p class="MsoNormal"><span>&#8212;&#8212;&#8212;&#8211;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal"><span><span></span>The second example is very important. When<br />
the user enters data in a number of fields, it is tedious to collect the data<br />
and transfer it to <span class="SpellE">jsp</span> page for processing. In our<br />
example, we are collecting data about a player<span class="GramE">,<span></span>such</span> as his name, place and game. We<br />
can have much more but we are restricting for space considerations. JSP has an<br />
action <span class="GramE">tag ,</span> known as &#039;<span class="SpellE"><b>jsp:setProperty</b></span><b>&#039;</b>.<br />
Using this along with a standard <span class="SpellE">javabean</span>, we can<br />
extract data and transfer it to our program in a single step.</span></p>
<p class="MsoNormal"><span>The syntax<br />
is</span></p>
<p class="MsoNormal"><b><span>&lt;<span class="SpellE">jsp<span class="GramE">:useBean</span></span></span></b><span></span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">id</span>=&quot;bean1&quot;<span></span>class=&quot;<span class="SpellE">ourbeans.player</span>&quot;<span></span>&gt;</span></p>
<p class="MsoNormal"><span><span></span><b>&lt;<span class="SpellE">jsp<span class="GramE">:setProperty</span></span></b></span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">name</span>=&quot;bean1&quot;<span></span>property=&quot;*&quot;<span></span>/&gt;</span></p>
<p class="MsoNormal"><span>&lt;/<span class="SpellE">jsp<span class="GramE">:useBean</span></span>&gt;</span></p>
<p class="MsoNormal"><span> <img src='http://www.javabeat.net/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
the * sign denotes &#039;all&#039;).</span></p>
<p class="MsoNormal"><span>&#8212;&#8211;</span></p>
<p class="MsoNormal"><span><span></span>But, we should first create the &#039;player &#039; bean<br />
with all the attributes and<b> getter &amp; setter methods</b>, as shown.</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><b><span>/<span class="GramE">/<span></span><span class="SpellE">player.java</span></span></span></b></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span class="GramE"><b><span>package</span></b></span><b><span><span class="SpellE">ourbeans</span>;</span></b></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span class="GramE"><span>public</span></span><span> class player</span></p>
<p class="MsoNormal"><span>{</span></p>
<p class="MsoNormal"><span><span></span>String<span></span>name;</span></p>
<p class="MsoNormal"><span><span></span>String<span></span>place;</span></p>
<p class="MsoNormal"><span><span></span>String<span></span>game;</span></p>
<p class="MsoNormal"><span><span></span></span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">public</span> player()</span></p>
<p class="MsoNormal"><span><span></span>{</span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">name</span>=&quot;<span></span>&quot;;</span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">place</span>=&quot;<br />
&quot;;</span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">game</span>=&quot;<br />
&quot;;<span></span></span></p>
<p class="MsoNormal"><span><span></span>}</span></p>
<p class="MsoNormal"><span>//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">public</span> void<b><span class="SpellE">setName</span></b>(String a)</span></p>
<p class="MsoNormal"><span><span></span>{<span></span><span class="GramE">name=</span>a; }</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">public</span> void <span class="SpellE"><b>setPlace</b></span>(String b)</span></p>
<p class="MsoNormal"><span><span></span>{<span></span><span class="GramE">place=</span>b; }</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">public</span> void <span class="SpellE"><b>setGame</b></span><b>(</b>String c)</span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">{<span></span>game</span>=c;<span></span>}</span></p>
<p class="MsoNormal"><span>//&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal"><span><span></span></span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">public</span> String<span></span><span class="SpellE"><b>getName</b></span>()</span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">{ return</span><span></span>name; }</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">public</span> String<span></span><span class="SpellE"><b>getPlace</b></span><b>()</b></span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">{ return</span><span></span>place; }</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">public</span> String<span></span><b><span></span><span class="SpellE">getGame</span>()</b></span></p>
<p class="MsoNormal"><span><span></span><span class="GramE">{ return</span><span></span>game; }</span></p>
<p class="MsoNormal"><span>}</span></p>
<p class="MsoNormal"><span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p class="MsoNormal"><span><span></span>In demo2.jsp, we collect the data and then <span class="GramE">display<span></span>the</span> data<br />
entered by the user.</span></p>
<p class="MsoNormal"><span>Note that<br />
instead of {param.text1}, we are using {bean1.name}. We should carefully name<br />
the html form controls with the corresponding attribute names given in the<br />
bean. We cannot name the controls as &#039;text1&#039; etc, now!</span></p>
<p class="MsoNormal"><span>&lt;<span class="SpellE">c<span class="GramE"> <img src='http://www.javabeat.net/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> ut</span></span><span></span>value<b>=&quot;${bean1.name}&quot;<span></span></b>/&gt;</span></p>
<p class="MsoNormal"><span>&lt;<span class="SpellE">c<span class="GramE"> <img src='http://www.javabeat.net/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> ut</span></span><span></span>value=&quot;${bean1.place}&quot;<span></span>/&gt;</span></p>
<p class="MsoNormal"><span>&lt;<span class="SpellE">c<span class="GramE"> <img src='http://www.javabeat.net/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> ut</span></span><span></span>value=&quot;${bean1.game}&quot;<span></span>/&gt;</span></p>
<p class="MsoNormal"><span>&#8212;</span></p>
<p class="MsoNormal"><span><span></span>We get correct result.</span></p>
<p class="MsoNormal"><span>=============================================</span></p>
<p class="MsoNormal"><b><span>//<span></span>demo2.jsp</span></b><span></span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span></span></p><div class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Middle-Med-Rect */
google_ad_slot = "7805667846";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<p class="MsoNormal"><span>&lt;%@<br />
page <span class="SpellE">contentType</span>=&quot;text/html&quot; %&gt;</span></p>
<p class="MsoNormal"><span>&lt;%@<br />
<span class="SpellE">taglib</span> prefix=&quot;c&quot; </span></p>
<p class="MsoNormal"><span class="SpellE"><span>uri</span></span><span>=&quot;http://java.sun.com/jstl/core<span class="GramE">&quot;<span></span>%</span>&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>&lt;<span class="GramE">html</span>&gt;</span></p>
<p class="MsoNormal"><span>&lt;<span class="GramE">body</span>&gt;</span></p>
<p class="MsoNormal"><span>&lt;form<br />
method=post<span></span><span></span>action=&quot;demo2.jsp&quot;&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>&lt;<span class="SpellE">jsp<span class="GramE">:useBean</span></span> id=&quot;bean1&quot;<br />
class=&quot;<span class="SpellE">ourbeans.player</span>&quot;&gt;</span></p>
<p class="MsoNormal"><b><span>&lt;<span class="SpellE">jsp<span class="GramE">:setProperty</span></span></span></b><span>name=&quot;bean1&quot;<b><br />
property=&quot;*&quot;<span></span></b>/&gt;</span></p>
<p class="MsoNormal"><span>&lt;/<span class="SpellE">jsp<span class="GramE">:useBean</span></span>&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>Name<br />
&lt;input<span></span>type=text<span></span><b><span></span>name=&quot;name</b>&quot;&gt;&lt;<span class="SpellE">br</span>&gt;</span></p>
<p class="MsoNormal"><span>Place&lt;<span class="GramE">input<span></span>type</span>=text<span></span><b>name=&quot;place&quot;</b>&gt;&lt;<span class="SpellE">br</span>&gt;</span></p>
<p class="MsoNormal"><span>Game&lt;input<span></span>type=text<span></span><b>name=&quot;game&quot;</b>&gt;&lt;<span class="SpellE">br</span>&gt;</span></p>
<p class="MsoNormal"><span><span></span></span></p>
<p class="MsoNormal"><span>&lt;input<br />
type=submit&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>&lt;/form&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>Name:<br />
<b>&lt;<span class="SpellE">c<span class="GramE"> <img src='http://www.javabeat.net/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> ut</span></span></b>value=<b>&quot;${bean1.name}&quot;</b><span></span>/&gt;&lt;<span class="SpellE">br</span>&gt;</span></p>
<p class="MsoNormal"><span>Place:<br />
&lt;<span class="SpellE">c<span class="GramE"> <img src='http://www.javabeat.net/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> ut</span></span><br />
value=&quot;${bean1.place}&quot;<span></span>/&gt;&lt;<span class="SpellE">br</span>&gt;</span></p>
<p class="MsoNormal"><span>Game:<br />
&lt;<span class="SpellE">c<span class="GramE"> <img src='http://www.javabeat.net/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> ut</span></span><br />
value=&quot;${bean1.game}&quot;<span></span>/&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>&lt;/body&gt;</span></p>
<p class="MsoNormal"><span>&lt;/html&gt;</span></p>
<p class="MsoNormal"><span>=============================================</span></p>
<p class="MsoNormal"><span>Once<br />
again, it will be noticed that there is no java code in this example, as<br />
everything is being done by tags, only<span class="GramE">..</span></span></p>
<p class="MsoNormal"><span>***********************************************</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>We<br />
are now ready to take up examples for <span class="GramE">&#039;condition&#039;<span></span>tags</span>.</span></p>
<p class="MsoNormal"><span><span></span>There are two types of &#039;condition tags&#039;.</span></p>
<p class="MsoNormal"><span class="GramE"><span>namely</span></span><span>, <b>&lt;<span class="SpellE">c:if</span>&gt;<span></span></b>&amp;<span></span><b>&lt;<span class="SpellE">c:choose</span></b>&gt;.</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><b><span>In the<br />
third demo, we learn how to use the &lt;<span class="SpellE">c<span class="GramE">:if</span></span><span></span>tag</span></b><span>.</span></p>
<p class="MsoNormal"><span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p class="MsoNormal"><span>/<b>/demo3.jsp</b></span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>&lt;%@<br />
page <span class="SpellE">contentType</span>=&quot;text/html&quot; %&gt;</span></p>
<p class="MsoNormal"><span>&lt;%@<br />
<span class="SpellE">taglib</span> prefix=&quot;c&quot; <span class="SpellE">uri</span>=&quot;http://java.sun.com/jstl/core<span class="GramE">&quot;<span></span>%</span>&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>&lt;<span class="GramE">html</span>&gt;</span></p>
<p class="MsoNormal"><span>&lt;body<span></span><span class="SpellE">bgcolor</span>=<span class="SpellE">lightblue</span>&gt;</span></p>
<p class="MsoNormal"><span>&lt;form<span></span>method=post<span></span>action=demo3.jsp&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>&lt;select<span></span>name=&quot;combo1&quot;&gt;</span></p>
<p class="MsoNormal"><span><span></span>&lt;option<span></span>value=&quot;<span class="SpellE">sam</span>&quot;&gt;<span class="SpellE">sam</span></span></p>
<p class="MsoNormal"><span><span></span>&lt;option<span></span><span></span>value=&quot;tom&quot;&gt;tom</span></p>
<p class="MsoNormal"><span>&lt;/select&gt;</span></p>
<p class="MsoNormal"><span>&lt;input<span></span>type=submit&gt;</span></p>
<p class="MsoNormal"><span>&lt;/form&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><b><span>&lt;<span class="SpellE">c<span class="GramE">:set</span></span><span></span></span></b><span class="SpellE"><span>var</span></span><span>=&quot;s&quot;<span></span>value<b>=&quot;${param.combo1}&quot;<span></span></b>/&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>&lt;<span class="SpellE"><b>c<span class="GramE"> <img src='http://www.javabeat.net/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> ut</span></b></span><br />
value=&quot;${s}&quot;<span></span>/&gt;</span></p>
<p class="MsoNormal"><span>&lt;<span class="SpellE"><span class="GramE">br</span></span>&gt;</span></p>
<p class="MsoNormal"><span><span></span></span></p>
<p class="MsoNormal"><b><span>&lt;<span class="SpellE">c<span class="GramE">:if</span></span><span></span>test=&quot;${s<span></span><span class="SpellE">eq</span><span></span></span></b><span>&#039;<span class="SpellE">sam</span>&#039;<span></span><b>}&quot;<span></span>&gt; </b></span></p>
<p class="MsoNormal"><span>&lt;<span class="SpellE">c<span class="GramE"> <img src='http://www.javabeat.net/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> ut</span></span><span></span>value=&quot;Good<br />
Morning&#8230;SAM!&quot;<span></span>/&gt;</span></p>
<p class="MsoNormal"><b><span>&lt;/<span class="SpellE">c<span class="GramE">:if</span></span>&gt;</span></b></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><b><span>&lt;<span class="SpellE">c<span class="GramE">:if</span></span><span></span>test=&quot;${s<span></span></span></b><b><span><span></span>=<br />
=<span></span></span></b><span><span></span></span><span>&#039;tom&#039;<b>}&quot;<span></span></b>&gt;</span></p>
<p class="MsoNormal"><span>&lt;<span class="SpellE">c<span class="GramE"> <img src='http://www.javabeat.net/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> ut</span></span><span></span>value=&quot; How Are<br />
You?&#8230;.TOM!&quot;<span></span>/&gt;</span></p>
<p class="MsoNormal"><b><span>&lt;/<span class="SpellE">c<span class="GramE">:if</span></span>&gt;</span></b><span></span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>&lt;/body&gt;</span></p>
<div>
<div style="border-style: none none solid;border-color: -moz-use-text-color -moz-use-text-color windowtext;border-width: medium medium 1pt;padding: 0in 0in 1pt">
<p class="MsoNormal" style="border: medium none;padding: 0in;text-align: justify"><span>&lt;/html&gt;</span></p>
<p class="MsoNormal" style="border: medium none;padding: 0in;text-align: justify"><span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p class="MsoNormal" style="border: medium none;padding: 0in;text-align: justify"><span><span></span></span><span><span></span>There is a combo with two options, namely </span></p>
<p class="MsoNormal" style="border: medium none;padding: 0in;text-align: justify"><span>&#039;<span class="SpellE"><span class="GramE">sam</span></span>&#039; and &#039;tom&#039;. If the user<br />
selects &#039;<span class="SpellE">sam</span>&#039; and submits the form, he gets &#039;<span class="SpellE">GoodMorning</span> &#8230;SAM!&quot;. If he selects &#039;tom&#039; instead, he<br />
gets </span></p>
<p class="MsoNormal" style="border: medium none;padding: 0in;text-align: justify"><span>&#039;How<br />
are <span class="SpellE">you<span class="GramE">..</span>TOM</span>?<span class="GramE">&#039;.</span></span></p>
</div>
</div>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span><span></span>The above code is no ‘Rocket-Science’ as<br />
American<span></span>authors <span class="SpellE">say!But</span><br />
, if we are careless<span></span>in typing the names<br />
‘<span class="SpellE">sam</span>’ or ‘tom’ in the test condition, we could spend<br />
hours together , trying to coax this code into functioning! We should not leave<br />
space after the single <span class="GramE">quote<span></span>in</span> the &#039;test expression&#039;. Second point worth noting in the above<br />
example is that we can use either <b>==</b><span class="GramE">( double</span> equal to) or <span class="SpellE"><b>eq</b></span><span></span>to test equality.</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>***********************************************</span></p>
<p class="MsoNormal"><span>In<br />
the <b>fourth</b> example which follows, we take up &lt;<span class="SpellE">c<span class="GramE">:choose</span></span>&gt; tag.</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>The<br />
syntax is: </span></p>
<p class="MsoNormal"><span>&lt;<span class="SpellE"><span class="GramE">c:</span>choose</span> &gt; </span></p>
<p class="MsoNormal"><span><span></span>&lt;<span class="SpellE">c<span class="GramE">:when</span></span><span></span>test=&quot;<span></span>&quot;<span></span>&gt;</span></p>
<p class="MsoNormal"><span><span></span>&lt;<span class="SpellE">c<span class="GramE"> <img src='http://www.javabeat.net/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> therwise</span></span>&gt;<span></span>something<span></span>&lt;/<span class="SpellE">c:otherwise</span>&gt;</span></p>
<p class="MsoNormal"><span><span></span>&lt;/<span class="SpellE">c<span class="GramE">:choose</span></span>&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>The<br />
peculiarity to be noted here is that<span></span>unlike &lt;<span class="SpellE">c<span class="GramE">:if</span></span> ,<br />
where we had to explicitly<span></span>use &lt;<span class="SpellE">c:out</span> for printing , </span><span>no such &lt;<span class="SpellE">c:out</span><br />
has been used here., and yet the result is displayed,</span></p>
<p class="MsoNormal"><span class="GramE"><span>because</span></span><span> &#039;choose&#039; includes &#039;displaying&#039;..</span></p>
<p class="MsoNormal"><span>When<br />
we choose &#039;7&#039;, &quot;<b>select between 1 &amp; <span class="GramE">5 <span style="font-weight: normal">&quot;</span></span></b> will be displayed!</span></p>
<p class="MsoNormal"><span><span></span></span></p>
<p class="MsoNormal"><span>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p class="MsoNormal"><b><span>/<span class="GramE">/<span></span>demo4.jsp</span></span></b></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>&lt;%@<br />
page <span class="SpellE">contentType</span>=&quot;text/html&quot; %&gt;</span></p>
<p class="MsoNormal"><span>&lt;%@<br />
<span class="SpellE">taglib</span> prefix=&quot;c&quot; <span class="SpellE">uri</span>=&quot;http://java.sun.com/jstl/core<span class="GramE">&quot;<span></span>%</span>&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span>&lt;<span class="GramE">html</span>&gt;</span></p>
<p class="MsoNormal"><span>&lt;body<span></span><span></span><span class="SpellE">bgcolor</span>=<span class="SpellE">lightblue</span>&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span><span></span>&lt;form<span></span>method=<span class="GramE">post<span></span>action</span>=&quot;demo3.jsp&quot;&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span><span></span>&lt;select name=&quot;combo1&quot;&gt;</span></p>
<p class="MsoNormal"><span><span></span>&lt;option value=&quot;1&quot;&gt;1<span></span>&lt;/option&gt;</span></p>
<p class="MsoNormal"><span><span></span>&lt;option value=&quot;2&quot;&gt;2<span></span>&lt;/option&gt;</span></p>
<p class="MsoNormal"><span><span></span>&lt;option value=&quot;3&quot;&gt;3<span></span>&lt;/option&gt;</span></p>
<p class="MsoNormal"><span><span></span>&lt;option value=&quot;4&quot;&gt;4<span></span>&lt;/option&gt;</span></p>
<p class="MsoNormal"><span><span></span>&lt;option value=&quot;5&quot;&gt;5<span></span>&lt;/option&gt;</span></p>
<p class="MsoNormal"><span><span></span>&lt;option value=&quot;7&quot;&gt;7<span></span>&lt;/option&gt;</span></p>
<p class="MsoNormal"><span><span></span>&lt;/select&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span><span></span>&lt;<span class="GramE">input<span></span>type</span>=submit&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span><span></span>&lt;<span class="SpellE">c<span class="GramE">:set</span></span><span class="SpellE">var</span>=&quot;s&quot;<span></span>value<b>=&quot;${param.combo1</b>}&quot;<span></span>/&gt;</span></p>
<p class="MsoNormal"><span>Today<br />
is</span></p>
<p class="MsoNormal"><span>&lt;<span class="SpellE"><span class="GramE">br</span></span>&gt;</span></p>
<p class="MsoNormal"><span>&lt;font<br />
size=24 color=red&gt;</span></p>
<p class="MsoNormal"><b><span>&lt;<span class="SpellE"><span class="GramE">c:</span>choose</span>&gt;</span></b></p>
<p class="MsoNormal"><b><span><span></span>&lt;<span class="SpellE">c<span class="GramE">:when</span></span><span></span>test=&quot;${</span></b><span>s==1}&quot;&gt;Sunday<br />
<b><span></span>&lt;/<span class="SpellE">c:when</span>&gt;</b></span></p>
<p class="MsoNormal"><span><span></span>&lt;<span class="SpellE">c<span class="GramE">:when</span></span><span></span>test=&quot;${s==2}&quot;&gt;Monday&lt;/<span class="SpellE">c:when</span>&gt;</span></p>
<p class="MsoNormal"><span><span></span>&lt;<span class="SpellE">c<span class="GramE">:when</span></span><span></span>test=&quot;${s==3}&quot;&gt;Tuesday&lt;/<span class="SpellE">c:when</span>&gt;</span></p>
<p class="MsoNormal"><span><span></span>&lt;<span class="SpellE">c<span class="GramE">:when</span></span><span></span>test=&quot;${s==4}&quot;&gt;Wednesday&lt;/<span class="SpellE">c:when</span>&gt;</span></p>
<p class="MsoNormal"><span><span></span>&lt;<span class="SpellE">c<span class="GramE">:when</span></span><span></span>test=&quot;${s==5}&quot;&gt;Thursday&lt;/<span class="SpellE">c:when</span>&gt;</span></p>
<p class="MsoNormal"><span></span></p>
<p>&lt;p class=&quot;MsoN</p>
<div class="wpInsert wpInsertInPostAd wpInsertBelow" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* JB-Footer-LU 468x15 */
google_ad_slot = "8789107210";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>]]></content:encoded>
			<wfw:commentRss>http://www.javabeat.net/2011/05/core-tags-in-jstl/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Error starting modern compiler in Ant and Eclipse</title>
		<link>http://www.javabeat.net/2011/04/error-starting-modern-compiler-in-ant-and-eclipse/</link>
		<comments>http://www.javabeat.net/2011/04/error-starting-modern-compiler-in-ant-and-eclipse/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 13:43:38 +0000</pubDate>
		<dc:creator>JavaBeat</dc:creator>
				<category><![CDATA[ANT]]></category>
		<category><![CDATA[Eclipse]]></category>

		<guid isPermaLink="false">http://www.javabeat.net/examples/?p=293</guid>
		<description><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><p>Eclipse and ANT Build Tool Error You would have come across this compiler error (error starting modern compiler) in many times during the developement. This error occirs when the actual Java runtime loaded by the environment and another tool is pointing to the differenet Java run time. This tips explains with example if this error [...]</p>]]></description>
				<content:encoded><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><div class="wpInsert wpInsertInPostAd wpInsertLeft" style="float: left; margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Rect */
google_ad_slot = "9976259118";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><h1>Eclipse and ANT Build Tool Error</h1>
<p>You would have come across this compiler error (<b>error starting modern compiler</b>) in many times during the developement. This error occirs when the actual Java runtime loaded by the environment and another tool is pointing to the differenet Java run time. This tips explains with example if this error occirs when you are trying to run the <b>Ant build tool</b> inside eclipse. The following are the screenshots which explains where you need to check and change it.</p>
<p><img src="images/2011/04/ant/ant-build.jpg" /></p>
<p><img src="images/2011/04/ant/ant-build-1.jpg" width="670" /></p><div class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Middle-Med-Rect */
google_ad_slot = "7805667846";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<p><img src="images/2011/04/ant/ant-build-2.jpg" width="670" /></p>
<p><font color="red">Here the jre selection must be the same as your eclipse is used for running the application. If its is different, you will get <b>error starting modern compiler</b></font></p>
<div class="wpInsert wpInsertInPostAd wpInsertBelow" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* JB-Footer-LU 468x15 */
google_ad_slot = "8789107210";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>]]></content:encoded>
			<wfw:commentRss>http://www.javabeat.net/2011/04/error-starting-modern-compiler-in-ant-and-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SAP PP Interview Questions [Press Release - Dreamtech Press]</title>
		<link>http://www.javabeat.net/2011/02/sap-pp-interview-questions-press-release-dreamtech-press/</link>
		<comments>http://www.javabeat.net/2011/02/sap-pp-interview-questions-press-release-dreamtech-press/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 04:51:20 +0000</pubDate>
		<dc:creator>JavaBeat</dc:creator>
				<category><![CDATA[Recommended Reference Books]]></category>

		<guid isPermaLink="false">http://www.javabeat.net/examples/?p=525</guid>
		<description><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><p>SAP PP Interview Questions (Hands on tips for cracking the interview) Description Technical interviews are largely focused on assessing your knowledge and skills on a specific technology or subject matter. Preparing for a technical job interview could be an uphill task, where you would need to scan voluminous books and material from numerous sources spread [...]</p>]]></description>
				<content:encoded><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><div class="wpInsert wpInsertInPostAd wpInsertLeft" style="float: left; margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Rect */
google_ad_slot = "9976259118";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><h1>SAP PP Interview Questions</h1>
<p><i><br />
<h2>(Hands on tips for cracking the interview)</h2>
<p></i></p>
<h3>Description</h3>
<div style="float:left"><img src="images/2011/02/sap-pp/sap-pp.gif" /></div>
<p><i>Technical interviews are largely focused on assessing your knowledge and skills on a specific technology or subject matter. Preparing for a technical job interview could be an uphill task, where you would need to scan voluminous books and material from numerous sources spread across different media. Wouldn’t your efforts be reduced greatly if you get a book specifically devoted towards the technical interviews on the respective technology/subject matter?</i></p>
<p>A new book by Dreamtech Press, <b><u>SAP PP Interview Questions</u> (Dreamtech Press, February 23, 2011, INR. 199/-, ISBN: 978-81-7722-796-3)</b> brings to you an economical and time-saving ensemble of probable questions being asked in the technical interviews, and their adequate answers and explanations.</p>
<p>This book gives not only the overall picture of SAP but also a good in-depth knowledge on the SAP-Production Planning Module. It also contains a detailed view of the potential questions as well as answers that you can expect in an interview related with <b>SAP-PP</b>. Moreover an attempt has been made to cover all the concepts related to Master data, MRP, demand management, SOP, and other important aspects of <b>SAP PP</b>. This book is equipped with Easy to understand language, practical examples, explanation of common issues and also with the answers to typical practical questions. It is highly recommended for learners and technical functional as well as techno-functional professionals.</p><div class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Middle-Med-Rect */
google_ad_slot = "7805667846";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<h3>About the Authors</h3>
<p>The proficient team at <b>Kogent Learning Solutions Inc.</b> and <b>Dreamtech Press</b> has seized the market of computer books bringing excellent content in software development to the fore. The team is committed to excellence—excellence in quality of content, excellence in the dedication of its authors and editors, excellence in the attention to detail, and excellence in understanding the needs of its readers.</p>
<h3>About Dreamtech Press</h3>
<div style="float:left"><img src="images/2011/02/sap-pp/dreamtech.jpg" /></div>
<p>Dreamtech Press is one of the India’s leading IT, Management and Engineering books publisher, devoted to students and professionals, novices and experts, instructors and teachers. We have ardently analyzed and comprehended the needs of our readers. Moreover our meticulous care in creating and publishing our books; focusing on generic and specific educational requirements and demands of our readers makes us the best choice among readers. Efficacious process management and enduring quality processes have been hallmark towards our success.</p>
<p>Relationship Investing is the core of our business that has been the hallmark of our success. No wonder, respected global corporation – Apress/Springer, Manning Publication (USA), Source Books Inc., Career Press and W-Business have trusted our capability to deliver value in India. We have an exclusive sales and distribution tie-up with Wiley India Pvt. Ltd. wherein all the books printed by Dreamtech Press and distributed by Wiley India Pvt. Ltd.</p>
<p><b>Media Contact:</b> <i>Akash Kumar Cell: +91 987 383 8807 Email: <a href="mailto:akash.kumar@dreamtechpress.com">akash.kumar@dreamtechpress.com</a></i></p>
<div class="wpInsert wpInsertInPostAd wpInsertBelow" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* JB-Footer-LU 468x15 */
google_ad_slot = "8789107210";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>]]></content:encoded>
			<wfw:commentRss>http://www.javabeat.net/2011/02/sap-pp-interview-questions-press-release-dreamtech-press/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 10 JavaScript Tips for your site</title>
		<link>http://www.javabeat.net/2011/02/top-10-javascript-tips-for-your-site/</link>
		<comments>http://www.javabeat.net/2011/02/top-10-javascript-tips-for-your-site/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 04:50:48 +0000</pubDate>
		<dc:creator>JavaBeat</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.javabeat.net/examples/?p=523</guid>
		<description><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><p>Introduction A good looking site is always more preferable than a bland looking site with a boring layout. To jazz up any site, a developer uses JavaScript. It is a popular programming language that used in creating a website with interactive content &#38; elements. The script is browser based and runs independently from page to [...]</p>]]></description>
				<content:encoded><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><div class="wpInsert wpInsertInPostAd wpInsertLeft" style="float: left; margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Rect */
google_ad_slot = "9976259118";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><h2>Introduction</h2>
<p>A good looking site is always more preferable than a bland looking site with a boring layout. To jazz up any site, a developer uses <b>JavaScript</b>. It is a popular programming language that used in <a HREF="http://www.createhostwebsites.com/" TARGET="_BLANK">creating a website</a> with interactive content &amp; elements. The script is browser based and runs independently from page to page. Integrating java codes into a site is easy to create stunning looking websites. Here, you can find 10 scripts that are highly recommended for any website developer or designers.</p>
<h2>1. No-Right Click Java Script</h2>
<p>Right clicking is second nature to most web users. To avoid them from right clicking on your site, this <b>javascript</b> code can be used. It is mostly to avoid duplication of the information that is used on the site. Those who view the site, due to this code won’t be able to carry out even the normal functions like ‘copy &amp; paste’, thus avoiding any possible data theft.</p>
<h2>2. Counters</h2>
<p>Google analytics is the best source to keep a track of visitors visiting the site. But, every time one wants to view the stats for their sites, they are required to log into their account, which is quite tedious. To make it easier in viewing the number of visitors a site can be installed with a ‘counter’ <b>javascript</b>. Having this <b>javascript</b> installed can enable the site to display the count for visitors frequenting the website. It is mostly useful for making constructive changes to render the site more traffic friendly.</p>
<h2>3. World Time</h2>
<p>Internet isn’t restricted to any particular time zone and that any website is accessible from anywhere in the world, it’s a good idea to have a world time clock displayed on the site. It is mostly to aid the visitors, and does little to attract traffic. This <b>javascript</b> is purely a visual element.</p>
<h2>4. Animations</h2>
<p>Those websites with fun animations are really great to look. Some sites are solely capable of attracting traffic on the basis of their use of interesting visual elements. So with the use of <b>javascript</b> to create fun &amp; interesting apps or graphic for the site will surely boost the number of visitors on the site. What kind of animation to be used, solely depends on the developer and his preference.</p>
<h2>5. Image Shuffle</h2>
<p>Site that has lots and lots of images, it can get pretty confusing for the user to go through each them, and find the appropriate one. Using a script to constantly display a shuffling image is much better than the traditional thumbnail view and facilitates the use to use the site in much better way. The shuffling images also add an interesting effect to the entire layout of the site. This <b>javascript</b> is useful and also is very much helpful in increasing the ‘visually appealing’ quotient of a site.</p><div class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Middle-Med-Rect */
google_ad_slot = "7805667846";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<h2>6. Special Navigation</h2>
<p>There is nothing more appealing on a site than a dedicated and easy to use navigation list or button. These are mostly drop down list, which contains categories or dates that can be used for browsing the content of the website. It is easy to install using <b>javascript</b> coding, and certain elements can be tweaked to render the navigation button/menu with some extra useful capabilities.</p>
<h2>7. Colorful Scroll Bars</h2>
<p>Making changes to color is one of the most common used in java scripting. It is done to add a personal touch to the entire layout using the color of choice. On most sites the scroll bar is usually grey. But, it can be changed to whatever color the user wishes to have, using java script. It adds a certain visual touch that makes the site appear attractive.</p>
<h2>8. Bookmarks</h2>
<p>Adding a site to your bookmark list is not a new thing. To extent the capabilities, one can integrate a better bookmarking tool, which can be used by the users who view the site. It will help them remember the page, without doing much search for the site the next time they want to visit the site.</p>
<h2>9. Music Players</h2>
<p>Create a versatile music player with the use of java script coding, and integrate it into the site so that people who like to listen to music, while browsing can find it useful.  Any media player is interesting to look at and adding a media player to the site will jazz up the attractive factor that much more.</p>
<h2>10. Password Protection</h2>
<p>Password protecting a page isn’t recommended for most. But, for those few who do want to make their pages visible to only few, they can password protect it using a java code. With such pages, a user visiting the site won’t be able to view it, unless the person retains a proper password. Password protecting a page is huge turn off and should be used only when absolutely sure.</p>
<div class="wpInsert wpInsertInPostAd wpInsertBelow" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* JB-Footer-LU 468x15 */
google_ad_slot = "8789107210";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>]]></content:encoded>
			<wfw:commentRss>http://www.javabeat.net/2011/02/top-10-javascript-tips-for-your-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JSTL Configuration Error</title>
		<link>http://www.javabeat.net/2010/12/jstl-configuration-error/</link>
		<comments>http://www.javabeat.net/2010/12/jstl-configuration-error/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 13:42:37 +0000</pubDate>
		<dc:creator>JavaBeat</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.javabeat.net/examples/?p=291</guid>
		<description><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><p>If you are getting the following error while running the JSP 2.0 in Tomcat server. It means the application is missing JSTL jar file. If you add standard.jar and jstl.jar the problem will be solved. 1 2 3 4 5 6 7 java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:286) com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:123) com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106) com.sun.faces.lifecycle.Phase.doPhase(Phase.java:103) com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) javax.faces.webapp.FacesServlet.service(FacesServlet.java:311)</p>]]></description>
				<content:encoded><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><div class="wpInsert wpInsertInPostAd wpInsertLeft" style="float: left; margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Rect */
google_ad_slot = "9976259118";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>
	If you are getting the following error while running the JSP 2.0 in Tomcat server.<br />
	It means the application is missing JSTL jar file. If you add standard.jar and jstl.jar<br />
	the problem will be solved.
</p><div class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Middle-Med-Rect */
google_ad_slot = "7805667846";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
	com.sun.faces.application.view.JspViewHandlingStrategy.executePageToBuildView(JspViewHandlingStrategy.java:286)
	com.sun.faces.application.view.JspViewHandlingStrategy.buildView(JspViewHandlingStrategy.java:123)
	com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
	com.sun.faces.lifecycle.Phase.doPhase(Phase.java:103)
	com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:311)</pre></td></tr></table></div>

<div class="wpInsert wpInsertInPostAd wpInsertBelow" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* JB-Footer-LU 468x15 */
google_ad_slot = "8789107210";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>]]></content:encoded>
			<wfw:commentRss>http://www.javabeat.net/2010/12/jstl-configuration-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is Immutable Objects in Java?</title>
		<link>http://www.javabeat.net/2010/12/what-is-immutable-objects-in-java/</link>
		<comments>http://www.javabeat.net/2010/12/what-is-immutable-objects-in-java/#comments</comments>
		<pubDate>Fri, 03 Dec 2010 13:41:40 +0000</pubDate>
		<dc:creator>JavaBeat</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.javabeat.net/examples/?p=289</guid>
		<description><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><p>An immutable object is something whose state can&#8217;t be change after there creation, e.g. String objects. Once you have created a String object, you can&#8217;t alter this. Creating an Immutable object&#8217;s class Creating an immutable object&#8217;s class can be tricky. Minimal requirement to create an immutable object&#8217;s class is, make class and every member variable, [...]</p>]]></description>
				<content:encoded><![CDATA[<p>Connect to us ( <a href="https://twitter.com/javabeat">@twitter</a> | <a href="https://www.facebook.com/javabeat.net">@facebook )</p><div class="wpInsert wpInsertInPostAd wpInsertLeft" style="float: left; margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Rect */
google_ad_slot = "9976259118";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div><p>An immutable object is something whose state can&#8217;t be change after there creation, e.g. String objects. Once you have created a String object, you can&#8217;t alter this.</p>
<h2>Creating an Immutable object&#8217;s class</h2>
<p>Creating an immutable object&#8217;s class can be tricky. Minimal requirement to create an immutable object&#8217;s class is, make class and every member variable, &#8220;final&#8221;.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">public final class SimpleImmutableClass {
 final int intVal = 5;
 final String sampleString = &quot;Hello&quot;;
 final Integer intObj = Integer.valueOf(10);
}</pre></td></tr></table></div>

<p>SimpleImmutableClass is a class of mutable object, one can&#8217;t change its state, once object is created. But it is too simple case. In real world situation is far more complex, you will rarely find such a simple class that has only primitive or immutable members (actually String and Integer classes are classes for immutable objects, provided by JDK API stack).</p>
<p>Consider following example, that has mutable objects as members, though every member is final, private and has only getters (to access) and no setters, but still do you think that it is a class that can produce immutable objects.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">public final class NotAnImmutableClass{
private final ArrayList sampleList = new ArrayList();
 private final Date today = new Date();
&nbsp;
 public ArrayList getSampleList() {
  return sampleList;
 }
 public Date getToday() {
  return today;
 }
}</pre></td></tr></table></div>

<p>What do you think about above class, is it really an Immutable object&#8217;s class? Unfortunately, a big NO. At first it seems like it is an immutable object&#8217;s class, after all, it is a final class, every variable is final and private and to give more assurance, it doesn&#8217;t contain any &#8220;setter&#8221; method. Some may give me a good fight arguing about immutability of the objects of this class.<br />
But then comes the villain, the very basic of Java, the &#8220;Reference&#8221;.  Consider the following listing:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">class PokeIntoSoCalledImmutableClass {
public void poke(){
  NotAnImmutableClass notAnImmutableClass = new NotAnImmutableClass();
  List samples = notAnImmutableClass.getSampleList();
  Date d = notAnImmutableClass.getToday();
  samples.add(&quot;Poked String&quot;);
  d.setYear(111);
  System.out.println(notAnImmutableClass.getSampleList().size());
  System.out.println(notAnImmutableClass.getToday());
 }
&nbsp;
}</pre></td></tr></table></div>

<p>What do you think, the method  poke() would print? Do you think it would print &#8220;0&#8243; and &#8220;Sun Jun 05 00:00:00 IST 2010&#8243;?  Answer is a big NO!!!</p><div class="wpInsert wpInsertInPostAd wpInsertMiddle" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* Article-Middle-Med-Rect */
google_ad_slot = "7805667846";
google_ad_width = 300;
google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>
<p>So, here comes another rule for a class whose objects to be immutable, either it should not have any mutable field (as in our case) or it should not publish (expose) its mutable members.</p>
<p>But again question is, what if we have to expose mutable objects and still we need that our class&#8217;s objects are immutable? Well answer is simple but tricky. USE CLONING!!!! If exposed object contains only immutable objects or primitive types, use shallow copy, otherwise use deep copy.</p>
<p>Correct way to implement Immutable class:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
</pre></td><td class="code"><pre class="language" style="font-family:monospace;">import java.util.ArrayList;
import java.util.Date;
import java.util.List;
&nbsp;
public class AnImmutableClass {
 private final ArrayList sampleList = new ArrayList();
 private final Date today = new Date(110,5,5);
&nbsp;
 public ArrayList getSampleList() {
  ArrayList returnList = new ArrayList();
  for(String s : sampleList){
   returnList.add(s);
  }
  return returnList;
 }
 public Date getToday() {
  return (Date)today.clone();
 }
&nbsp;
 public static void main(String[] args) {
  PokeIntoSoCalledImmutableClass pokeClass = new PokeIntoSoCalledImmutableClass();
  pokeClass.poke();
 }
&nbsp;
}
&nbsp;
class PokeIntoSoCalledImmutableClass {
 public void poke(){
  AnImmutableClass anImmutableClass = new AnImmutableClass();
  List samples = anImmutableClass.getSampleList();
  Date d = anImmutableClass.getToday();
  samples.add(&quot;Poked String&quot;);
  d.setYear(111);
  System.out.println(anImmutableClass.getSampleList().size());
  System.out.println(anImmutableClass.getToday());
 }
&nbsp;
}</pre></td></tr></table></div>

<p>I here conclude with set of rules to make a class whose objects are immutable:</p>
<ul>
<li>Must be final</li>
<li>Only final members should be exposed to outer world</li>
<li> Exposed members should be immutable</li>
<li>If it is require to expose mutable members, then use shallow or deep cloning while exposing them</li>
</ul>
<p>
	Source:<i> <a href="http://hellotojavaworld.blogspot.com/" target="_blank">http://hellotojavaworld.blogspot.com/</a></i></p>
<div class="wpInsert wpInsertInPostAd wpInsertBelow" style="margin: 5px; padding: 0px;"><script type="text/javascript"><!--
google_ad_client = "ca-pub-1490953723360528";
/* JB-Footer-LU 468x15 */
google_ad_slot = "8789107210";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>]]></content:encoded>
			<wfw:commentRss>http://www.javabeat.net/2010/12/what-is-immutable-objects-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
