tag:blogger.com,1999:blog-6405952409923916192024-02-20T01:35:41.823-08:00Anjur Chan's BlogAnjur Chanhttp://www.blogger.com/profile/05866305346636051339noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-640595240992391619.post-70528543428686460512014-04-12T10:35:00.000-07:002014-04-12T10:35:12.264-07:00Configure and run Hadoop 2 mapreduce job history server#1 - Create the yarn pid dir
<pre class="prettyprint" >
<HADOOP_YARN_HOME>/work/pids
</pre>
<br/>
#2 - Enable log aggregation
<pre class="prettyprint" >
<property>
<name>yarn.log-aggregation-enable</name>
<value>true</value>
</property>
</pre>
<br/>
#3 - Add defult yarn pid dir to the yarnenv.sh
<pre class="prettyprint" >
# default pid directory
if [ "$YARN_PID_DIR" = "" ]; then
YARN_LOG_DIR="$HADOOP_YARN_HOME/work/pids"
fi
</pre>
<br/>
#4 - After you start your dfs (<HADOOP_HOME>/sbin/start-dfs.sh) and yarn (<HADOOP_HOME>/sbin/start-yarn.sh) start your yarn mapreduce history server
<pre class="prettyprint" >
[hduser@hostname sbin]$ ./mr-jobhistory-daemon.sh start historyserver
starting historyserver, logging to <HADOOP_HOME>/logs/mapred-hduser-historyserver-step-cca-sjc-lnx-lab9.out
[hduser@hostname sbin]$
</pre><br/>
For a nice hadoop 2 multi cluster quick installation click <a href="http://solaimurugan.blogspot.com/2013/11/setup-multi-node-hadoop-20-cluster.html">here</a>
Anjur Chanhttp://www.blogger.com/profile/05866305346636051339noreply@blogger.com8tag:blogger.com,1999:blog-640595240992391619.post-29768049581507609332013-02-14T22:16:00.001-08:002013-02-16T22:27:18.004-08:00Apache camel trace enabling from spring XML log4jWondering why your apache camel trace is not working and you are not seeing the camel route trace.<br />
<br />
<a href="http://camel.apache.org/tracer.html">http://camel.apache.org/tracer.html</a><br />
<br />
Add the following dependencies to your pom.xml<br />
<pre class="prettyprint" >
<depedency>
<groupId>org.slf4j</groupId>
<artifactId> slf4j-log4j12<artifactId>
<version>1.6.1</version>
<depedency>
</pre>
<br />
Enable apache camel tracer<br />
<pre class="prettyprint" >
<span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"><span style="line-height: 19.71875px;"><camelContext trace="true" xmlns="http://activemq.apache.org/camel/schema/spring"></span></span>
<span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"><span style="line-height: 19.71875px;"> ...</span></span><br />
<span style="font-family: Arial, Helvetica, sans-serif; font-size: x-small;"><span style="line-height: 19.71875px;"></camelContext></span></span>
</pre>
<br />
Thats all. Enjoy your camel ride !<br />
<br />
<pre class="code-java" style="font-size: 11px; line-height: 13px; margin: 5px 5px 5px 15px; padding: 0px;"></pre>Anjur Chanhttp://www.blogger.com/profile/05866305346636051339noreply@blogger.com0tag:blogger.com,1999:blog-640595240992391619.post-91957559809525487032012-07-15T01:16:00.000-07:002012-08-27T23:09:36.564-07:00couchdb running multiple instances and data replication<a href="http://couchdb.apache.org/">http://couchdb.apache.org/</a><br />
<br />
<b><span style="color: #3d85c6;">Running multiple instance of couchdb:</span></b><br />
<br />
The following has to be changed in the instance-x.ini:<br />
<span style="background-color: white; color: #9fc5e8;"><br /></span>
<span style="background-color: white; color: #9fc5e8;">database_dir</span><span style="background-color: white;"> = some_location/couchdb-x (data location for the couchdb instance)</span><br />
<br />
<span style="color: #9fc5e8;">view_index_dir</span> = some_location/couchdb-x<br />
.....<br />
[httpd]<br />
<span style="color: #9fc5e8;">port</span> = new-port-no (assume instance1 runs on 5984 and instance2 runs on 5985)<br />
....<br />
<br />
[log]<br />
<span style="color: #9fc5e8;">file</span> = some_location/log/couch-x.log<br />
<br />
<span style="background-color: white;"><br /></span>
<span style="background-color: white;">Assuming that both the instances are going to run on the same host. Running first instance of couchdb </span><br />
<br />
<span style="background-color: white; color: #9fc5e8;">couchdb -a some_location/instance1.ini -p instance1.pid</span><br />
<br />
<span style="background-color: white;">Running second instance of couchdb</span><br />
<span style="color: #9fc5e8;">couchdb -a some_location/instance2.ini -p instance2.pid</span><br />
<br />
Make sure that both the instance of the database is running using the 'ps -ef | grep couch' command.<br />
<br />
<span style="color: #3d85c6;"><b>Data Replication:</b></span><br />
<br />
Run the following command to replicate the data between multiple instances (in our case from instance1 to instance2 and the other way).<br />
<br />
Replication from instance1 to instance 2<br />
<br />
<span style="color: #9fc5e8;">curl -X POST -H "Content-Type: application/json" -d '{"source":"http://localhost:5984/test-db", "target":"test-db", "continuous":true, "doc_ids":["doc1", "doc2"]}' http://localhost:5985/_replicate</span><br />
<br />
Reverse the port no's in the above command (change 5984 to 5985 and viceversa) for the replication from instance 2 to instance1. Optional parameter "continuous":true tells couchdb to replicate continuously whenever there is a change in the db. Leaving this parameter would do the replication once when the command is executed. Couchdb is famous for filtered replication. There are multiple ways to do filtered replication. In the above command the optional parameter "doc_ids":["doc1", "doc2"] tells couchdb to replicate only the doc1 and doc2 documents. If there are other documents for eg: doc3, doc4, etc they won't be replicated. Couchdb is very powerful in filtered replication and works very nicely on the mobile devices which might go online and offline very frequently due to coverage issues.<br />
<br />
Some useful considerations for couchdb:<br />
<br />
1 - Lightweight (around 23M resident size)<br />
2 - MVCC - Multi Version Concurrency Control - would be a natural fit for the products that need to track multiple updates to the same document<br />
3 - <a href="http://guide.couchdb.org/draft/consistency.html">Filtered data replication</a><br />
4 - NoSQL,Document based,<span style="background-color: white; font-family: Palatino, 'Palatino Linotype', Georgia, Times, 'Times New Roman', serif; font-size: 16px; line-height: 20px; text-align: left;">schema-free design - </span><span style="background-color: white;">No relational data and the data could vary during updates at various intervals</span><br />
5 - For a embeddable solution take a look at <a href="https://github.com/couchbaselabs/TouchDB-iOS/wiki/Why-TouchDB%3F">touchdb</a><br />
6 - Offline web applications - <a href="http://pouchdb.com/">pouchDB</a><br />
7 - Clustering <a href="http://bigcouch.cloudant.com/">Big Couch</a><br />
<br />
<a href="http://kkovacs.eu/cassandra-vs-mongodb-vs-couchdb-vs-redis">Cassandra vs MongoDB vs CouchDb vs Redis vs Riak vs HBase vs Membase vs Neo4j</a><br />
<br />
The above are some of the main features apart from plethora of benefits couchdb provides.<br />
<br />
Couchdb is supported by cloudant team - <a href="http://blog.cloudant.com/the-future-of-couchdb/">http://blog.cloudant.com/the-future-of-couchdb/</a><br />
<br />
couchdb doesn't stop here ... there are lot more ....<br />
<br />Anjur Chanhttp://www.blogger.com/profile/05866305346636051339noreply@blogger.com0tag:blogger.com,1999:blog-640595240992391619.post-30105107594401015412012-07-03T17:28:00.000-07:002012-07-15T01:23:46.108-07:00JBoss 7 - Caused by: org.dom4j.DocumentException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactorySimple solution to fix this issue:<br />
<div>
<br /></div>
<div>
<a href="https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7">https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7</a></div>
<div>
<br /></div>
<div>
If you do not want to read the above URL, which is really not giving the straight forward solution:</div>
<div>
<span style="background-color: white;">1 - Open {your war}/META-INF/MANIFEST.MF</span></div>
<div>
2 - Add this line at the end - Dependencies: org.dom4j export</div>
<div>
<span style="background-color: white;"><br /></span><br />
<span style="background-color: white;">You do not need to do any of the following:</span></div>
<div>
<span style="background-color: white;">1 - jboss-deployment-structure.xml - exclussions</span></div>
<div>
2 - Adding subsystem to include org.dom4j as global modules</div>
<div>
3 - Remove your dom4j-1.6.1.jar from your WEB-INF/lib directory</div>
<div>
<br /></div>
<div>
Most of the time you hit this problem when you try to deploy a war that has hibernate 4 included in it. In this case you may want to do the following for JBoss 7:</div>
<div>
<span style="background-color: white;">To your persistence.xml add the following properties, which is not need for tomcat (assuming you are using oracle > 10g).</span></div>
<div>
<span style="background-color: white;"> <properties</span><span style="background-color: white;"> </span><span style="background-color: white;">></span><br />
<span style="background-color: white;"> <</span><span style="background-color: white;">property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"/</span><span style="background-color: white;"> </span><span style="background-color: white;">></span><br />
<span style="background-color: white;"> <</span><span style="background-color: white;">property name="hibernate.listeners.envers.autoRegister" value="false"/</span><span style="background-color: white;"> </span><span style="background-color: white;">></span><br />
<span style="background-color: white;"><</span><span style="background-color: white;">/properties</span><span style="background-color: white;"> </span><span style="background-color: white;">></span><br />
<br /></div>Anjur Chanhttp://www.blogger.com/profile/05866305346636051339noreply@blogger.com0tag:blogger.com,1999:blog-640595240992391619.post-40891597323345127642008-12-01T23:10:00.000-08:002008-12-02T02:18:03.226-08:00My First RichFaces & Java Server Faces (JSF) Web Application<span style="font-weight: bold; color: rgb(153, 0, 0);"><br /><br />REQUIREMENTS</span><br /><br /><span style="font-weight: bold;">1 - Java SE Development Kit (JDK) 6 Update 11</span><br /><span style="text-decoration: underline;"></span><br />Download <a href="https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jdk-6u11-oth-JPR@CDS-CDS_Developer">Java SE 6</a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0RgRWOXNqVvawkIFcgOMmjyvAUMQ4wbpg5L2Wy4OMvpr7dkzCRsSYiEiB_rxaPOjCKvFIIh1gSln96D5L08ZCKZAAwCp_EcCMcP6EAv6MuXyEYnf0X2QHKymUcql9lRtQX_9UXvLJhHnW/s1600-h/java-se-6u11-download.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 282px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0RgRWOXNqVvawkIFcgOMmjyvAUMQ4wbpg5L2Wy4OMvpr7dkzCRsSYiEiB_rxaPOjCKvFIIh1gSln96D5L08ZCKZAAwCp_EcCMcP6EAv6MuXyEYnf0X2QHKymUcql9lRtQX_9UXvLJhHnW/s320/java-se-6u11-download.JPG" alt="" id="BLOGGER_PHOTO_ID_5275087377018649378" border="0" /></a><br /><br />To install Java double click on the executable jdk-6u11-windows-i586.exe and follow the wizard instructions.<br /><br /><span style="font-weight: bold;">2 - Apache Tomcat 6.0.18</span><br /><br />Tomcat is needed to deploy and run your RichFaces web application.<br /><br />Download <a href="http://apache.inetbridge.net/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.exe">Tomcat 6.0.18</a><br /><br />To install Tomcat, double click on the apache-tomcat-6.0.18.exe and follow the wizard instructions. You need to use the Java 6 home in the 'Java Virtual Machine' page.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQHznrDoYezDgJgDBNSLo4HboUplRpFlBpy9OqqPvx_1TACUGd8rBIqJ9Dtw-RxDyyhojKvV8a01iTpCt0nakMFvw-XsH90b5kyTDB62YUEVq71mC4aB4joLZTP21UdsyfyXdZGtuKgn3g/s1600-h/tomcat-java-sdk-selection-wizard-page.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQHznrDoYezDgJgDBNSLo4HboUplRpFlBpy9OqqPvx_1TACUGd8rBIqJ9Dtw-RxDyyhojKvV8a01iTpCt0nakMFvw-XsH90b5kyTDB62YUEVq71mC4aB4joLZTP21UdsyfyXdZGtuKgn3g/s320/tomcat-java-sdk-selection-wizard-page.JPG" alt="" id="BLOGGER_PHOTO_ID_5275087958392711106" border="0" /></a><br /><span style="font-weight: bold;">3 - Eclipse Enterprise Edition 3.4 Ganymede</span><br /><br />Download <a href="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/ganymede/SR1/eclipse-jee-ganymede-SR1-win32.zip">eclipse-jee-ganymede-SR1-win32</a><br /><br /><span style="font-weight: bold;">4 - Java Server Faces (JSF) libraries</span><br /><br />Download <a href="https://javaserverfaces.dev.java.net/files/documents/1866/35457/jsf-1_2.zip">JSF 1.2</a><br /><br /><span style="font-weight: bold;">5 - Java Standard Tag Library (JSTL) libraries</span><br /><br />Download <a href="http://download.java.net/maven/glassfish/javax/servlet/jsp/jstl/jstl-api/1.2/jstl-api-1.2.jar">JSTL 1.2</a><br /><br /><span style="font-weight: bold;">6 - Facelets libraries</span><br /><br />Download <a href="https://facelets.dev.java.net/files/documents/3448/84208/facelets-1.1.14.zip">Facelets 1.1.14</a><br /><br /><span style="font-weight: bold;">7 - RichFaces libraries</span><br /><br />Download <a href="http://www.jboss.org/downloading/?projectId=jbossrichfaces&url=http://download.jboss.com/jboss-richfaces/richfaces-ui-3.2.2.SR1-bin.zip">RichFaces 3.2.2</a><br /><br /><span style="font-weight: bold;">8 - Apache Commons libraries</span><br /><br />RichFaces needs the following apache commons jars:<br /><br />Download<br /><a href="http://archive.apache.org/dist/commons/beanutils/binaries/commons-beanutils-1.7.0.jar">commons-beanutils-1.7.0 </a><br /><a href="http://archive.apache.org/dist/commons/collections/binaries/commons-collections-3.2.zip">commons-collections-3.2</a><br /><a href="http://www.eng.lsu.edu/mirrors/apache/commons/digester/binaries/commons-digester-1.8.zip">commons-digester-1.8</a><br /><a href="http://apache.cs.utah.edu/commons/logging/binaries/commons-logging-1.1.1-bin.zip">commons-logging-1.1.1</a><br /><span style="font-weight: bold;"><br /><span style="color: rgb(153, 0, 0);">EXTRATING THE ZIP FILES</span></span><br /><br />Extract all the zip files to any directory (My extract directory C:\canjur\downloads).<br /><br />Iam going to refer this directory (C:\canjur\downloads) as your <span style="font-weight: bold;">DOWNLOADS_EXTRACT_HOME</span> hereafter.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghnGAfIDW9LSrvwT266gWpXoDP538jahhoAKUaKMN6tSLMP00pdAfM9Y0UP9JST-Sgef3YJGuQMAlQgZKcrajOmBslIy0HqqfFQgS2m7Xq9ZyUK-M87U7amnHaAiQk6FOq67rssC7Cw7ia/s1600-h/contents-c-canjur.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 175px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghnGAfIDW9LSrvwT266gWpXoDP538jahhoAKUaKMN6tSLMP00pdAfM9Y0UP9JST-Sgef3YJGuQMAlQgZKcrajOmBslIy0HqqfFQgS2m7Xq9ZyUK-M87U7amnHaAiQk6FOq67rssC7Cw7ia/s320/contents-c-canjur.JPG" alt="" id="BLOGGER_PHOTO_ID_5275089503451354066" border="0" /></a><br /><span style="font-weight: bold; color: rgb(153, 0, 0);">LAUNCH ECLIPSE & CREATE WORKSPACE</span><br /><br /><span style="font-weight: bold;">Step 1:</span><br /><br />Go to <your eclipse home>\eclipse & Launch eclipse enterprise edition (eclipse.exe)<br /><br /><span style="font-weight: bold;">Step 2:</span><br /><br />Create a workspace. Say C:\workspace-jee\richfaces-demo-1<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1wLrHt2WjB2W2mPHkRKOCY7zyVQvMhOi-0eV97dRHCxSpC91-yT9jJ8s0lbxe6SXoETRS2_GUrzTC1GyTHMmjrk_hs_37OtefpBgQ1lYuppUzOfrIhSzCe5da7s8Mempz_jUKmlURpYEs/s1600-h/eclipse-workspace_launcher.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 131px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1wLrHt2WjB2W2mPHkRKOCY7zyVQvMhOi-0eV97dRHCxSpC91-yT9jJ8s0lbxe6SXoETRS2_GUrzTC1GyTHMmjrk_hs_37OtefpBgQ1lYuppUzOfrIhSzCe5da7s8Mempz_jUKmlURpYEs/s320/eclipse-workspace_launcher.JPG" alt="" id="BLOGGER_PHOTO_ID_5275107365553019794" border="0" /></a><br /><span style="font-weight: bold; color: rgb(153, 0, 0);">SETUP ECLIPSE FOR RICHFACES DEVELOPMENT</span><br /><br /><span style="font-weight: bold;">Step 3:</span><br /><br />In eclipse, go to Window->Preferences and choose Web->JavaServer Faces Tools->Libraries<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI7-cEZm8nP7iDWiMIpeOfHFmRU64qbBtRHuCorkCqvgrDwyayv9eTZuD05lC4TLqKDcMkuYMGSJn9iapJ7f7M6NNs5J3mIEj2Jf2UktsQkRjlRsS1wIC_OosAXbJ0y0JGfYEDPcjHQe4q/s1600-h/eclipse-window-preferences-web-jsf.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 273px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgI7-cEZm8nP7iDWiMIpeOfHFmRU64qbBtRHuCorkCqvgrDwyayv9eTZuD05lC4TLqKDcMkuYMGSJn9iapJ7f7M6NNs5J3mIEj2Jf2UktsQkRjlRsS1wIC_OosAXbJ0y0JGfYEDPcjHQe4q/s320/eclipse-window-preferences-web-jsf.JPG" alt="" id="BLOGGER_PHOTO_ID_5275090975167080050" border="0" /></a><br /><span style="font-weight: bold;">Step 4:</span><br /><br />You need to define the following new JSF libraries which is needed to create a JSF 1.2 with RichFaces web application<br /><ul><li>SUN_RI_1.2</li><li>JSTL</li><li>FACELETS</li><li>RICHFACES</li><li>COMMONS</li></ul>Lets do it one by one.<br /><br /><span style="font-weight: bold;">SUN-RI-1.2</span><br /><br />Click 'New ...' in the 'Libraries' page. Input the following :<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3kbigoB99AVvNzxIPqy6747X8pq3rICYW1xX9ZEePlc1gvyNfQjkN54GpdAdDo1lhKC7p1jT_5fTDKWwf5p1Lv5p2PtvlY-eY6Bngf1AnA78Ay-5YppXWA3niBQSBFj5u8g7HOjKEVr0y/s1600-h/eclipse-window-preferences-web-jsf.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 273px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3kbigoB99AVvNzxIPqy6747X8pq3rICYW1xX9ZEePlc1gvyNfQjkN54GpdAdDo1lhKC7p1jT_5fTDKWwf5p1Lv5p2PtvlY-eY6Bngf1AnA78Ay-5YppXWA3niBQSBFj5u8g7HOjKEVr0y/s320/eclipse-window-preferences-web-jsf.JPG" alt="" id="BLOGGER_PHOTO_ID_5275099891540687714" border="0" /></a><br />Library Name: SUN-RI-1.2<br />Version Supported: v1_2<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7HP4W2Vocd1xlgr0kngCVBeS2igK5_fR_OiWOxMV1KkhUhG_mZokSOWY1jVhA2B7_CdRkMKsmxh9GzMQILZOnBUmCc9xqjVaSO9qO_7PDE2k75DqZwoiItio2FBs_6UOC5FeHzeTb_B87/s1600-h/eclipse-SUN_RI_1.2.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 275px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7HP4W2Vocd1xlgr0kngCVBeS2igK5_fR_OiWOxMV1KkhUhG_mZokSOWY1jVhA2B7_CdRkMKsmxh9GzMQILZOnBUmCc9xqjVaSO9qO_7PDE2k75DqZwoiItio2FBs_6UOC5FeHzeTb_B87/s320/eclipse-SUN_RI_1.2.JPG" alt="" id="BLOGGER_PHOTO_ID_5275101251023723442" border="0" /></a><br />Click 'Add' under 'Library Jars'. The Browser for Jars/Zips pops up.<br /><br />Go to your <DOWNLOADS_EXTRACT_HOME>\jsf-1_2\jsf-1.2-b20-FCS\lib (in my machine it is C:\canjur\jsf-1_2\jsf-1.2-b20-FCS\lib).<br /><br />Select jsf-api.jar & jsf-impl.jar and click 'Open'.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixYPz_zbNTAdhirstFCz25QMDSh_Qzpfphplrgp_CZ0bVft2kyNNF3Pv9yuNztB31Tl9VshNkM5rV4yT4obOQF6aF2YA0uHFS3fzWevLkjp-Klh7oIGzYXIfY7LU0geR3aT4cbTDZYgtZH/s1600-h/eclipse-SUN_RI_1.2_jars.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 258px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixYPz_zbNTAdhirstFCz25QMDSh_Qzpfphplrgp_CZ0bVft2kyNNF3Pv9yuNztB31Tl9VshNkM5rV4yT4obOQF6aF2YA0uHFS3fzWevLkjp-Klh7oIGzYXIfY7LU0geR3aT4cbTDZYgtZH/s320/eclipse-SUN_RI_1.2_jars.JPG" alt="" id="BLOGGER_PHOTO_ID_5275102530025991122" border="0" /></a>Check 'Is JSF Implementation' in the Create JSF Library popup and click 'Finish'.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgTMsW7e8RTjvreDWFLZ-MAZQWAhG0X0OEyZq6Pwri7cZwOGmZ3AqUiVYxtubCBYUDmLMrRmUpaqzSI9qKsCZawclEXnMhgy5WBvGhORZrzaqw7MB1XYQ3ZOU8Mz1hX1iyNFJ2D0IUVSAF/s1600-h/eclipse-SUN_RI_1.2_JSF_Library.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 258px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgTMsW7e8RTjvreDWFLZ-MAZQWAhG0X0OEyZq6Pwri7cZwOGmZ3AqUiVYxtubCBYUDmLMrRmUpaqzSI9qKsCZawclEXnMhgy5WBvGhORZrzaqw7MB1XYQ3ZOU8Mz1hX1iyNFJ2D0IUVSAF/s320/eclipse-SUN_RI_1.2_JSF_Library.JPG" alt="" id="BLOGGER_PHOTO_ID_5275103375864483602" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj4jbIpn8MD4236SyugAIohVa5WtzPJGz_bCdnBhTypPnk6KLWH2C2WVv-uIZCOgfk70Op_zBMTi9S2pHluSyTZRg1i-zMU-lBU2_dSt47sjNlwBfQ8J9gnJ4zIL5TXPC6YuSE9xtMESfY/s1600-h/eclipse-SUN_RI_1.2_Libraries.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 270px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj4jbIpn8MD4236SyugAIohVa5WtzPJGz_bCdnBhTypPnk6KLWH2C2WVv-uIZCOgfk70Op_zBMTi9S2pHluSyTZRg1i-zMU-lBU2_dSt47sjNlwBfQ8J9gnJ4zIL5TXPC6YuSE9xtMESfY/s320/eclipse-SUN_RI_1.2_Libraries.JPG" alt="" id="BLOGGER_PHOTO_ID_5275103841425531266" border="0" /></a><br /><span style="font-weight: bold;">JSTL</span><br /><br />Repeat the same steps listed under SUN-RI-1.2 to add the JSTL library.<br /><br />Note: Do not Check the 'Is JSF Implementation' for JSTL.<br /><br />Library Name : JSTL<br />Version Supported : v1_2<br /><br />Jar Location : <DOWNLOADS_EXTRACT_HOME><br />Jar Name(s) : jstl-api-1.2.jar<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP0S3k3HPiWISCP93y9FCmGrnIobhWvcTIerVgVvTpOY-8VeWa2XQyef075PwZ6O-rZ5qAw0-iLZ17q9U8EWjty1PZVhKAyTSzbwQpxsb7ZwuEyff1TmlaW0QrxX4_b5-lSVCgcoFZHt9o/s1600-h/eclipse-JSTL-Library.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 270px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP0S3k3HPiWISCP93y9FCmGrnIobhWvcTIerVgVvTpOY-8VeWa2XQyef075PwZ6O-rZ5qAw0-iLZ17q9U8EWjty1PZVhKAyTSzbwQpxsb7ZwuEyff1TmlaW0QrxX4_b5-lSVCgcoFZHt9o/s320/eclipse-JSTL-Library.JPG" alt="" id="BLOGGER_PHOTO_ID_5275104273242922386" border="0" /></a><br /><span style="font-weight: bold;">FACELETS</span><br /><br />Repeat the same steps listed under SUN-RI-1.2 to add the FACELETS library.<br /><br />Note: Do not Check the 'Is JSF Implementation' for FACELETS.<br /><br />Library Name : FACELETS<br />Version Supported : v1_2<br /><br />Jar Location : <DOWNLOADS_EXTRACT_HOME>\facelets-1.1.14\facelets-1.1.14<br />Jar Name(s) : jsf-facelets.jar<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGwQuLvMjUXaofIqpF4OkTyUjqup5e1FFs1Bmb99cARlErdv6WMiorOa5a12T_XjrwOD3FBdjwXTRfE6y_lwxRAKHFK0h2WlqaoFpt16fvau71iEmsbuC8_eul_Ry4lUkdrJeVnDTbJ2VQ/s1600-h/eclipse-FACELETS-Libraries.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 276px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGwQuLvMjUXaofIqpF4OkTyUjqup5e1FFs1Bmb99cARlErdv6WMiorOa5a12T_XjrwOD3FBdjwXTRfE6y_lwxRAKHFK0h2WlqaoFpt16fvau71iEmsbuC8_eul_Ry4lUkdrJeVnDTbJ2VQ/s320/eclipse-FACELETS-Libraries.JPG" alt="" id="BLOGGER_PHOTO_ID_5275104865276737730" border="0" /></a><br /><span style="font-weight: bold;">RICHFACES</span><br /><br />Repeat the same steps listed under SUN-RI-1.2 to add the RICHFACES library.<br /><br />Note: Do not Check the 'Is JSF Implementation' for RICHFACES.<br /><br />Library Name : RICHFACES<br />Version Supported : v1_2<br /><br />Jar Location :<br /><span style="font-size:85%;"><DOWNLOADS_EXTRACT_HOME>\richfaces-ui-3.2.2.SR1-bin\richfaces-ui-3.2.2.SR1\lib</span><br /><br />Jar Name(s) :<br />richfaces-api-3.2.2.SR1.jar<br />richfaces-ui-3.2.2.SR1.jar<br />richfaces-impl-3.2.2.SR1.jar<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlP1aK3jCKQPtSOlymS_W9x5ORk9Uyh2x9QE9Uuq6HIanoIcW9wv37u_6ucuTJK2NYZn_E6Rf38WsoDuVSPrs-4ySd7axxQAMqZMH0vhkepGzKJAJHszAd6OVezD-D0yNmdlhpXv-8kZuY/s1600-h/eclipse-RICHFACES-Libraries.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 218px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlP1aK3jCKQPtSOlymS_W9x5ORk9Uyh2x9QE9Uuq6HIanoIcW9wv37u_6ucuTJK2NYZn_E6Rf38WsoDuVSPrs-4ySd7axxQAMqZMH0vhkepGzKJAJHszAd6OVezD-D0yNmdlhpXv-8kZuY/s320/eclipse-RICHFACES-Libraries.JPG" alt="" id="BLOGGER_PHOTO_ID_5275105295711249826" border="0" /></a><span style="font-weight: bold;">COMMONS</span><br /><br />Repeat the same steps listed under SUN-RI-1.2 to add the COMMONS library.<br /><br />Note: Do not Check the 'Is JSF Implementation' for COMMONS.<br /><br />Library Name : COMMONS<br />Version Supported : v1_2<br /><br />Jar Location :<br /><DOWNLOADS_EXTRACT_HOME> (for commons-beanutils-1.7.0.jar)<br /> <DOWNLOADS_EXTRACT_HOME>\commons-collections-3.2\commons-collections-3.2<br /> <DOWNLOADS_EXTRACT_HOME>\commons-digester-1.8\commons-digester-1.8<br /> <DOWNLOADS_EXTRACT_HOME>\commons-logging-1.1.1-bin\commons-logging-1.1.1<br /><br />Jar Name(s) :<br />commons-beanutils-1.7.0.jar<br /> commons-collections-3.2.jar<br /> commons-digester-1.8.jar<br /> commons-logging-1.1.1.jar<br /><br />Finally, Click OK button in the Preferences->Web->JavaServer Faces Tools popup.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzrj7xYDoVvZTC-HA53SxAL7T4Y9d9N9IqKh3d6sdRyRGAzEG1TIQBQMjSjJv-95VtMSRG1fMEoyy_nxr-vtTavV-b4fyo_9diwg-eHm9jbO23SI7Vo5C-Yl1iPV1Bs8uGtzU54xmKqG54/s1600-h/eclipse-COMMONS-Libraries.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 223px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzrj7xYDoVvZTC-HA53SxAL7T4Y9d9N9IqKh3d6sdRyRGAzEG1TIQBQMjSjJv-95VtMSRG1fMEoyy_nxr-vtTavV-b4fyo_9diwg-eHm9jbO23SI7Vo5C-Yl1iPV1Bs8uGtzU54xmKqG54/s320/eclipse-COMMONS-Libraries.JPG" alt="" id="BLOGGER_PHOTO_ID_5275108400208710450" border="0" /></a><br />You are ready to create a RichFaces web application. Lets rock !<br /><br /><span style="font-weight: bold; color: rgb(153, 0, 0);">RICHFACES WEB APPLICATION</span><br /><br /><span style="font-weight: bold;">Step 5:</span><br /><br />Create a new Dynamic Web Project in eclipse.<br /><br />Click File->New->Dynamic Web Project<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNO1uA8XeG9vGmJhs_Clys28kvGa5iLhpri57qeri6LnNHD5pc3ey8l9X9jGf1NOOWSucVv38FhhmiHgVvLfSmHtG7uNZt26_7gEOtkP4tEb7ADRjPjq2YvH-KETLh2xT2-inuVTCL0Ah3/s1600-h/eclipse-new-dynamic-web-project.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 318px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNO1uA8XeG9vGmJhs_Clys28kvGa5iLhpri57qeri6LnNHD5pc3ey8l9X9jGf1NOOWSucVv38FhhmiHgVvLfSmHtG7uNZt26_7gEOtkP4tEb7ADRjPjq2YvH-KETLh2xT2-inuVTCL0Ah3/s320/eclipse-new-dynamic-web-project.JPG" alt="" id="BLOGGER_PHOTO_ID_5275130010038304066" border="0" /></a><br /><span style="font-weight: bold;">Project Name :</span> RichFaces<br /><span style="font-weight: bold;">Target Runtime :</span> <none> (Don't worry about it now. We will define it later.)<br /><span style="font-weight: bold;">Dynamic Web Module Version </span>: 2.5<br /><span style="font-weight: bold;">Configuration : </span>JavaServer Faces v1.2 Project<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2_kPTPdzDjYbLcQDH6Wb4gob885Fi3si-X-JoGgX0T62ABmXFt2-zpT6OdpX5GKWcIzjjjQOyMgPZyiuWplM-4LNcGC015N9gs5JYzkLiN0gzmu-vM_kUUsY6s_FvIYCeV5Q6GtAAN1zs/s1600-h/eclipse-new-dynamic-web-project-wizard-1.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 306px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2_kPTPdzDjYbLcQDH6Wb4gob885Fi3si-X-JoGgX0T62ABmXFt2-zpT6OdpX5GKWcIzjjjQOyMgPZyiuWplM-4LNcGC015N9gs5JYzkLiN0gzmu-vM_kUUsY6s_FvIYCeV5Q6GtAAN1zs/s320/eclipse-new-dynamic-web-project-wizard-1.JPG" alt="" id="BLOGGER_PHOTO_ID_5275109372475292130" border="0" /></a>Click Next.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkaDP5fn8ob2vPQWzTeLrX3wowhDQ_jR4aG2OaqRsm8NkZ1sZP_nbo3Lw8atCxeR4W_vn7jBqZtF4aKFfB26d8lz-KeqM8TGtvNObQ2oU2iAJTRYelKIPk-ngoObl-FLoXuKqpaJoYjMVA/s1600-h/eclipse-new-dynamic-web-project-wizard-2.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 280px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkaDP5fn8ob2vPQWzTeLrX3wowhDQ_jR4aG2OaqRsm8NkZ1sZP_nbo3Lw8atCxeR4W_vn7jBqZtF4aKFfB26d8lz-KeqM8TGtvNObQ2oU2iAJTRYelKIPk-ngoObl-FLoXuKqpaJoYjMVA/s320/eclipse-new-dynamic-web-project-wizard-2.JPG" alt="" id="BLOGGER_PHOTO_ID_5275110274524593746" border="0" /></a>Click Next.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWg6R6b1jF-zlxafvXDx8xAeYyVfMcjSTKGez6VBkVZ-k3wJCMqn4mmXPyapG-BjDf69vya2KBFtmp-fDDw5Ce6kI1Qjl3as-1yF1CXaclMWVVmO5_smFDCfDc95B3-XjU92c7e0aHsfc6/s1600-h/eclipse-new-dynamic-web-project-wizard-3.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 278px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWg6R6b1jF-zlxafvXDx8xAeYyVfMcjSTKGez6VBkVZ-k3wJCMqn4mmXPyapG-BjDf69vya2KBFtmp-fDDw5Ce6kI1Qjl3as-1yF1CXaclMWVVmO5_smFDCfDc95B3-XjU92c7e0aHsfc6/s320/eclipse-new-dynamic-web-project-wizard-3.JPG" alt="" id="BLOGGER_PHOTO_ID_5275111218710078370" border="0" /></a><br /></none><ol><li><none>Choose SUN_RI_1.2 <default> under JSF Libraries:</default></none></li><li><none><default>Add all the Component Libraries to Deploy (click >>)</default></none></li><li><none><default>Remove /faces/* from URL Mapping Patterns and add *.jsf</default></none></li></ol><none><default><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi4POWl-YK21l8sIBwmsBe-2J15RR1rGhAj35237q4RmDYHfhmr8EmiP8yS7hSJOsVPAGQCvP3i_poxCHNhjvBcKgpw4C734xYhi5lTuXbcCN1eOpMg_P6J9W-wr8dyK7e3KzBWu6gZnOi/s1600-h/eclipse-new-dynamic-web-project-wizard-4.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 281px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhi4POWl-YK21l8sIBwmsBe-2J15RR1rGhAj35237q4RmDYHfhmr8EmiP8yS7hSJOsVPAGQCvP3i_poxCHNhjvBcKgpw4C734xYhi5lTuXbcCN1eOpMg_P6J9W-wr8dyK7e3KzBWu6gZnOi/s320/eclipse-new-dynamic-web-project-wizard-4.JPG" alt="" id="BLOGGER_PHOTO_ID_5275112093429094290" border="0" /></a><br />Click 'Finish'. You will see the project tree similar to the one shown in the picture below.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitiAqw6wv-X4MxMlTGMaDJuYQrVWt6Eq7Y53sesdUVPUs_fZM9URgR-2j-rc1ICF4whUkSPqeZqoEU2jyX1rl4IfpQSFvfn7UnlOkguEpTOYWoNnTs3frcNm0B9WMYlcHPzTMUMyyjbCnU/s1600-h/eclipse-richfaces-project-tree-initial.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 223px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitiAqw6wv-X4MxMlTGMaDJuYQrVWt6Eq7Y53sesdUVPUs_fZM9URgR-2j-rc1ICF4whUkSPqeZqoEU2jyX1rl4IfpQSFvfn7UnlOkguEpTOYWoNnTs3frcNm0B9WMYlcHPzTMUMyyjbCnU/s320/eclipse-richfaces-project-tree-initial.JPG" alt="" id="BLOGGER_PHOTO_ID_5275112833728356962" border="0" /></a><br /><span style="font-weight: bold; color: rgb(153, 0, 0);">RICHFACES CONFIGURATION FILES</span><br /><br /><span style="font-weight: bold;">Step 6: </span><br /><br />Edit your RichFaces->WebContent->WEB-INF web.xml & faces-config.xml, go to src tab and type the contents shown in the images below:<br /><br /><span style="font-weight: bold;">web.xml</span> (<span style="font-size:85%;">Iam not able to properly indend & color the XML file hence the picture. If you need the XML files write to me. I will mail it to you</span>)<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbtVPUwmmGm-BS2cEwKBO3S02PtSO_q0tGVG5VA9-klNa1jPOLIIq4l6jZfC21JHXCoutbqh5rzQJB-ZfjDUS9ISPz3xIMAhicQkIVH3AUjFKv_3SfdLruW1eRqA6Vju3jw4ukdcOu-8wi/s1600-h/web_xml.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 295px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbtVPUwmmGm-BS2cEwKBO3S02PtSO_q0tGVG5VA9-klNa1jPOLIIq4l6jZfC21JHXCoutbqh5rzQJB-ZfjDUS9ISPz3xIMAhicQkIVH3AUjFKv_3SfdLruW1eRqA6Vju3jw4ukdcOu-8wi/s320/web_xml.jpg" alt="" id="BLOGGER_PHOTO_ID_5275120339245369938" border="0" /></a><span style="font-weight: bold;">faces-config.xml </span>(<span style="font-size:85%;">Iam not able to properly indend & color the XML file hence the picture. If you need the XML files write to me. I will mail it to you</span>)<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijwr6JYoheIv512NXU5TETHm4a_VbqeWn6uNGIw7pMLiEIsFpQoXUvd2MXx-v_KBwko8o8Tl0sKfp5ZbcIREFB32O8mUQcr0Yf0OSDQ_JqWpmwphMIRnUZEMi8NN1u1NN7v_h03jZGJdP5/s1600-h/faces-config-xml.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 174px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijwr6JYoheIv512NXU5TETHm4a_VbqeWn6uNGIw7pMLiEIsFpQoXUvd2MXx-v_KBwko8o8Tl0sKfp5ZbcIREFB32O8mUQcr0Yf0OSDQ_JqWpmwphMIRnUZEMi8NN1u1NN7v_h03jZGJdP5/s320/faces-config-xml.jpg" alt="" id="BLOGGER_PHOTO_ID_5275121878264272546" border="0" /></a>Save your web.xml & faces-config.xml.<br /><br /><span style="font-weight: bold; color: rgb(153, 0, 0);">INDEX & JSP FILES</span><br /><br /><span style="font-weight: bold;">Step 7:</span><br /><br />Create index.html & iexplore.jsp under RichFaces->WebContent and copy paste the contents below.<br /><br /><span style="font-weight: bold;">index.html</span> </default></none>(<span style="font-size:85%;">Iam not able to properly indend & color the file hence the picture. If you need the file write to me. I will mail it to you</span>)<br /><none><default><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_Ep1tGI7NwDRNmB_rAVlOPj19ZPlE50k_H3JitB2MoyHM0BiOeI2oTiK6w9YZQXMxPGa1_WCtGHJBzHiCavez8u_ePll6oxVYdzsV8OJQ2he97gKsWWw6YIxDDYAz7rgUcqpEfsATOyCd/s1600-h/index_html.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 79px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_Ep1tGI7NwDRNmB_rAVlOPj19ZPlE50k_H3JitB2MoyHM0BiOeI2oTiK6w9YZQXMxPGa1_WCtGHJBzHiCavez8u_ePll6oxVYdzsV8OJQ2he97gKsWWw6YIxDDYAz7rgUcqpEfsATOyCd/s320/index_html.jpg" alt="" id="BLOGGER_PHOTO_ID_5275124664378501282" border="0" /></a><span style="font-weight: bold;">iexplore.jsp</span> </default></none>(<span style="font-size:85%;">Iam not able to properly indend & color the file hence the picture. If you need the file write to me. I will mail it to you</span>)<br /><none><default><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIibOPG5QSFWf-47SOQqQQBuDWaO7bDoVJ7WUX3gZ56Y05mzSXGo1TQfyDzQLxk4u3B4sZrEIpeikqumE4dhjElVi5h3GMCQt5NK3cilNSd0R9ZbHKW0-cxXo06OAxJuFExkk6NUEAAtFn/s1600-h/iexplore_jsp.jpg"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 153px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIibOPG5QSFWf-47SOQqQQBuDWaO7bDoVJ7WUX3gZ56Y05mzSXGo1TQfyDzQLxk4u3B4sZrEIpeikqumE4dhjElVi5h3GMCQt5NK3cilNSd0R9ZbHKW0-cxXo06OAxJuFExkk6NUEAAtFn/s320/iexplore_jsp.jpg" alt="" id="BLOGGER_PHOTO_ID_5275125027663176562" border="0" /></a><span style="font-weight: bold; color: rgb(153, 0, 0);">JAVA SRC FILES (JSF MANAGED BEANS)</span><br /><br /><span style="font-weight: bold;">Step 8:</span><br /><br />Right click 'Java Resources: src' in you project tree and select New->Package to create a package called richfaces.managedbeans.<br /><br />Create Java files named<br /></default></none><ul><li><none><default><insert html="" contents=""><insert jsp="" contents="">FileSystemBean.java</insert></insert></default></none></li><li><none><default><insert html="" contents=""><insert jsp="" contents=""> FileSystemNode.java</insert></insert></default></none></li><li><none><default><insert html="" contents=""><insert jsp="" contents=""> PostbackPhaseListener.java</insert></insert></default></none></li><li><none><default><insert html="" contents=""><insert jsp="" contents=""> TreeDemoStateAdvisor.java</insert></insert></default></none></li></ul><none><default><insert html="" contents=""><insert jsp="" contents="">The files listed above are available @<br /><a href="http://jsfunit.demo.jboss.com/jboss-jsfunit-examples-richfaces/richfaces/treeNodesAdaptor.jsf;jsessionid=0BF2ED38CD2F8D7F3131F69ECFD94ED4?c=recursiveTreeNodesAdaptor"></a><br /><a href="http://jsfunit.demo.jboss.com/jboss-jsfunit-examples-richfaces/richfaces/treeNodesAdaptor.jsf?c=recursiveTreeNodesAdaptor"><span style="text-decoration: underline;">http://jsfunit.demo.jboss.com/jboss-jsfunit-examples-richfaces/richfaces/treeNodesAdaptor.jsf?c=recursiveTreeNodesAdaptor</span></a><br /><br />In case you are not seeing the files under the abover URL, then navigate to<br /></insert></insert></default></none><ol><li><a href="http://jsfunit.demo.jboss.com/jboss-jsfunit-examples-richfaces/"><none><default><insert html="" contents=""><insert jsp="" contents="">http://jsfunit.demo.jboss.com/jboss-jsfunit-examples-richfaces/</insert></insert></default></none></a></li><li><none><default><insert html="" contents=""><insert jsp="" contents="">Click RichTrees in the Left panel bar</insert></insert></default></none></li><li><none><default><insert html="" contents=""><insert jsp="" contents="">Click Recursive Tree Adaptor</insert></insert></default></none></li></ol><none><default><insert html="" contents=""><insert jsp="" contents="">Once you are done copied the java files to your richfaces.managedbeans package you need to do the following :<br /></insert></insert></default></none><ol><li><none><default><insert html="" contents=""><insert jsp="" contents="">All the java files has package name as package org.richfaces.treemodeladaptor. Change it to 'richfaces.managedbeans'.</insert></insert></default></none></li><li><none><default><insert html="" contents=""><insert jsp="" contents=""> Open FileSystemBean.java and change the line <span style="font-weight: bold;">private static String SRC_PATH = "/WEB-INF/src";</span></insert></insert></default></none> to <span style="font-weight: bold;">private static String SRC_PATH = "/WEB-INF";</span><br /></li></ol><none><default><insert html="" contents=""><insert jsp="" contents="">Your project tree should look like this :<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1k3Xb_mO7zCqqtJ3AAEjLssHhgBdp5k1Y_aqs7edviaXZna3Pg9qKuwAw3JMHl5lsB2REdbpd8WCFx0DkpxDis101-EkDLtJId1VeC_zrxCgYUNiEIrjtUldvQF9fOnmstzXm_vZc4kys/s1600-h/eclipse-richfaces-project-tree-final.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 161px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1k3Xb_mO7zCqqtJ3AAEjLssHhgBdp5k1Y_aqs7edviaXZna3Pg9qKuwAw3JMHl5lsB2REdbpd8WCFx0DkpxDis101-EkDLtJId1VeC_zrxCgYUNiEIrjtUldvQF9fOnmstzXm_vZc4kys/s320/eclipse-richfaces-project-tree-final.JPG" alt="" id="BLOGGER_PHOTO_ID_5275125641665984466" border="0" /></a><br /><br /><span style="font-weight: bold; color: rgb(153, 0, 0);">JAVA PROPERTIES FILE</span><br /><br />We are going to create a properties file called iexplore.properties under your RichFaces->Java Resources:src.<br /><br /><span style="font-weight: bold;">Step 9:</span><br /><br />Right click Java Resources:src and choose New->Other. Choose General->File and click Next.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPKiqK1nYp8LQav7ozx6pq3hHKizcU0_fWOAdHqADU2vIrqK213RkPicOpC3gFk5BGWufhZYBo8_DtoYRrANkDlv3WQbix5vXibA-Yjf3RU9Vr9r_k_WquoqweUyVVK23H7VrNBCGNQ0la/s1600-h/eclipse-create-properties-file-1.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPKiqK1nYp8LQav7ozx6pq3hHKizcU0_fWOAdHqADU2vIrqK213RkPicOpC3gFk5BGWufhZYBo8_DtoYRrANkDlv3WQbix5vXibA-Yjf3RU9Vr9r_k_WquoqweUyVVK23H7VrNBCGNQ0la/s320/eclipse-create-properties-file-1.JPG" alt="" id="BLOGGER_PHOTO_ID_5275125998272101282" border="0" /></a>Select RichFaces->src folder. Input 'iexplore.properties' for the File name and click Finish.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5hQOQVwsezZ9y1d8EFh9DG8k69zDrYMy_XD6kGqo279F9qNhkTZSINpF18rpYqOxHLkSyQWJ2FULorsgBS6OFcA1sdTfdffsAHaWSMIulo7YrTU-PY6XLeFzMypCUnVh6klzHQw3yVmfh/s1600-h/eclipse-create-properties-file-2.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 278px; height: 320px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5hQOQVwsezZ9y1d8EFh9DG8k69zDrYMy_XD6kGqo279F9qNhkTZSINpF18rpYqOxHLkSyQWJ2FULorsgBS6OFcA1sdTfdffsAHaWSMIulo7YrTU-PY6XLeFzMypCUnVh6klzHQw3yVmfh/s320/eclipse-create-properties-file-2.JPG" alt="" id="BLOGGER_PHOTO_ID_5275126225155773298" border="0" /></a>Open iexplore.properties, copy & paste the following line in the editor and save the file.<br /><br /><span style="font-weight: bold;">appname=File System Explorer</span><br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIFpgrhP-Be0dEcF9fO-qnFXCJyEGTqU79ROsO4N1VuSXdKV4pNs0L_dmnz2w9U3nWPeAQndHyjNjcHnk3g9xY_zrdGReamh-T8AY4MwDO7nvDe5p2lc9FyPn4lQ5Lq-TnOb-psDgW1zAP/s1600-h/eclipse-property-file-contents.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 217px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIFpgrhP-Be0dEcF9fO-qnFXCJyEGTqU79ROsO4N1VuSXdKV4pNs0L_dmnz2w9U3nWPeAQndHyjNjcHnk3g9xY_zrdGReamh-T8AY4MwDO7nvDe5p2lc9FyPn4lQ5Lq-TnOb-psDgW1zAP/s320/eclipse-property-file-contents.JPG" alt="" id="BLOGGER_PHOTO_ID_5275126538927206866" border="0" /></a><br /><br /><span style="font-weight: bold; color: rgb(153, 0, 0);">RUNNING THE RICHFACES WEB APPLICATION</span><br /><br />Lets run our RichFaces web application. Before we run you should know what the application is going to display in the browser window inside eclipse.<br /><br />The <span style="font-weight: bold;">index.html</span> is going to navigate to <span style="font-weight: bold;">iexplore.jsp</span> file.<br /><br />The <span style="font-weight: bold;">iexplore.jsp</span> is going to read the file structure under your deployed web application WEB-INF and display it using the RichFaces <<a href="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/tree.html">rich:tree</a>> and <<a href="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/recursiveTreeNodesAdaptor.html">rich:recursivetreenodesadaptor</a>> components.<br /><br />This application may sound too much for a beginer, but once you get it up and running you will learn everything you want to build a sophisticated RichFaces web application. That is my motto !<br /><br /><span style="font-weight: bold;">Step 10:</span><br /><br />Right click on RichFaces->WebContent->index.html and select Run As->Run on Server<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ4L2UNwSEje955jKwAWxqwCQ9POkLpHfK8PoBcJvQk_n25MWE_l25QpnQw_nH2vTc674PQE0SiiEecsF5hRdCYiAh5S6kBYsZATWeYeUy8rqV7bmAt4R8NKFYMa5DQ4pSI-ORn6dOr4pj/s1600-h/eclipse-richfaces-runas-runonserver.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 262px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQ4L2UNwSEje955jKwAWxqwCQ9POkLpHfK8PoBcJvQk_n25MWE_l25QpnQw_nH2vTc674PQE0SiiEecsF5hRdCYiAh5S6kBYsZATWeYeUy8rqV7bmAt4R8NKFYMa5DQ4pSI-ORn6dOr4pj/s320/eclipse-richfaces-runas-runonserver.JPG" alt="" id="BLOGGER_PHOTO_ID_5275128270740279458" border="0" /></a>Under 'Select the server type' choose 'Tomcat v6.0 Server' and click Next.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSw5LgDJFlXiSyEhayXf6NbfxR-Khl1g-swnuqI5LAtCXRTAUiuNtj8wD3zRC6qFbbS-UhB9f0Sdgj9aF3HKcQw-fn4qfmFRzk7zGyGg7Phq5bgktnvLOqHvTlg0x4Rt_m_F03F7voWbNG/s1600-h/eclipse-richfaces-select-apache-v6.0.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 298px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSw5LgDJFlXiSyEhayXf6NbfxR-Khl1g-swnuqI5LAtCXRTAUiuNtj8wD3zRC6qFbbS-UhB9f0Sdgj9aF3HKcQw-fn4qfmFRzk7zGyGg7Phq5bgktnvLOqHvTlg0x4Rt_m_F03F7voWbNG/s320/eclipse-richfaces-select-apache-v6.0.JPG" alt="" id="BLOGGER_PHOTO_ID_5275128562660672450" border="0" /></a>Click on 'Browse' button under 'Tomcat installation directory'.<br /><br />Choose you <tomcat home=""> (on my system it is C:\Program Files\Apache Software Foundation\Tomcat 6.0)<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkkUt-_pvi8TiZIfM7cqdqNYz4IhsjZydQOfoxTt6KA_rlZ3Ay5GGrmgvpc2eBunryDVdE2PNAR77yJjxeVqlx8siyDyux5q2yXUfmqMxYhjD9jJ5OB71zAb08y8sxDAPBWDr07SjXKcCK/s1600-h/eclipse-select-tomcat-home.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 193px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkkUt-_pvi8TiZIfM7cqdqNYz4IhsjZydQOfoxTt6KA_rlZ3Ay5GGrmgvpc2eBunryDVdE2PNAR77yJjxeVqlx8siyDyux5q2yXUfmqMxYhjD9jJ5OB71zAb08y8sxDAPBWDr07SjXKcCK/s320/eclipse-select-tomcat-home.JPG" alt="" id="BLOGGER_PHOTO_ID_5275128877799033122" border="0" /></a>Click Next. The wizard should look like the one shown below.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm_Gzqb_VgUxdxKGadgx-OnPQ62m3DUYehIduzwf9duOlYkmqf7Z0p_M_54dFvAjr9eZecG4hCpLtSc96IPGTasSFSGdJNs9e1XD1oYnI2XOxs7C_wjfSGboGHqDjLf4dDDLBF8ZtOPd07/s1600-h/eclipse-select-tomcat-final.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 194px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjm_Gzqb_VgUxdxKGadgx-OnPQ62m3DUYehIduzwf9duOlYkmqf7Z0p_M_54dFvAjr9eZecG4hCpLtSc96IPGTasSFSGdJNs9e1XD1oYnI2XOxs7C_wjfSGboGHqDjLf4dDDLBF8ZtOPd07/s320/eclipse-select-tomcat-final.JPG" alt="" id="BLOGGER_PHOTO_ID_5275129083248874642" border="0" /></a>Click 'Finish'. Eclipse will start the tomcat server and deploy your RichFaces web application.<br /><br />You should see the following in the eclipse browser.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx9Q71GoiQfFy7UHdkOvJ5r-ElT5m3W5RKdwNUGH1UvdA40qtr4d1fQCRnuUeInHfg0nUf92KZt595LpD50qAzy2DxEvjGcyo8c29riRKwPTTyBNwnhB-xL6w6L8JBHV7b03s0p67_KJBe/s1600-h/eclipse-richfaces-output.JPG"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 299px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgx9Q71GoiQfFy7UHdkOvJ5r-ElT5m3W5RKdwNUGH1UvdA40qtr4d1fQCRnuUeInHfg0nUf92KZt595LpD50qAzy2DxEvjGcyo8c29riRKwPTTyBNwnhB-xL6w6L8JBHV7b03s0p67_KJBe/s320/eclipse-richfaces-output.JPG" alt="" id="BLOGGER_PHOTO_ID_5275129506480722978" border="0" /></a><br /><span style="font-weight: bold; color: rgb(204, 51, 204);">CONGRATULATIONS ! You have learned all the technologies needed to develop RichFaces/JSF web applications.</span><br /><span style="font-size:85%;"><br /></span></tomcat></insert></insert></default></none><span style="font-style: italic;font-size:85%;" ><span style="font-weight: bold;">Note 1:</span> If you are stuck or if any of the download links are broken please write to me. I will fix it in this article.<br /><br /></span><none><default><insert html="" contents=""><insert jsp="" contents=""><tomcat home=""><span style="font-style: italic;font-size:85%;" ><span style="font-weight: bold;">Note 2:</span> I didn't had time to explain in detail about the web.xml & faces-config.xml. I will explain them later on demand.</span><br /></tomcat></insert></insert></default></none>Anjur Chanhttp://www.blogger.com/profile/05866305346636051339noreply@blogger.com2tag:blogger.com,1999:blog-640595240992391619.post-85377723015244416422008-10-09T18:33:00.000-07:002008-12-01T23:09:17.032-08:00Eclipse RCP Update ManagerToday, I did tried adding the update manager UI and setting up an update site for my eclipse RCP application. Everything went fine. I did set up the menu item Update->Software Updates. Added my update site and able to locate the new features :) I was happy and believe me its a cool feature eclipse provides. But the moment I selected my new feature under (Select the features to install), the 'Updates' dialog throws the following error :<br /><br />Resulting configuration does not contain the platform<br /><br />oops ! I tried debugging this issue for hours. Googled .... and found out that for your Update Manager to work properly you need to have everything as a feature and no-plugins. If you created a product file for your eclipse RCP application with 'plugins' turned on under 'The product configuration is based on:' tab of your product files 'Overview' section, you need to changed the option from 'plugins' to 'fetaures'. Hold on ! You have other things to do ....<br /><br />I would suggest you to follow the Section 9 - Add Update-Manager to rcpmail of <a href="http://www.eclipsecon.org/2005/presentations/EclipseCon2005_Tutorial8.pdf">http://www.eclipsecon.org/2005/presentations/EclipseCon2005_Tutorial8.pdf</a><br /><br />I got this link from the eclipse RCP FAQ Page - <a href="http://wiki.eclipse.org/index.php/RCP_FAQ#How_can_I_add_the_Eclipse_Update_Manager_to_my_application.3F">http://wiki.eclipse.org/index.php/RCP_FAQ#How_can_I_add_the_Eclipse_Update_Manager_to_my_application.3F</a><br /><br />Don't give up. It worked for me and definitely it will work for you too.<br /><br />Write to me if you still find it difficult to make it work. I will help you.Anjur Chanhttp://www.blogger.com/profile/05866305346636051339noreply@blogger.com1tag:blogger.com,1999:blog-640595240992391619.post-57112929541355639922008-08-13T17:43:00.000-07:002008-08-13T17:47:51.544-07:00Attn SWT Developers !Every SWT developer should browse <a href="http://inside-swt.blogspot.com/">http://inside-swt.blogspot.com</a> before you decide to go with SWT. Iam not against SWT ! Iam actually an EClipse RCP programmer. You should know what you are doing before you start. Once started there is no way out !Anjur Chanhttp://www.blogger.com/profile/05866305346636051339noreply@blogger.com0tag:blogger.com,1999:blog-640595240992391619.post-41260668742260016572008-08-13T17:36:00.000-07:002008-08-13T17:37:58.709-07:00Eclipse SWT vs SwingGood discussion on Eclipse SWT vs Java Swing<br /><br /><a href="http://www.damnhandy.com/2006/02/12/why-bother-with-swt-over-swing/">http://www.damnhandy.com/2006/02/12/why-bother-with-swt-over-swing/</a>Anjur Chanhttp://www.blogger.com/profile/05866305346636051339noreply@blogger.com0tag:blogger.com,1999:blog-640595240992391619.post-81938895952187395532008-08-10T01:19:00.001-07:002008-08-10T01:24:26.909-07:00HARIHARANHARI is Lord Vishnu. HARAN is Lord Shiva. Hari and Haran are one and the same said Thiru Boothathu Azhvar. Boothathu Azhavr is one of the 12 azhvars who praised, loved and lived thinking about Lord Vishnu always.<br /><br />SHIVA and VISHNU are one and the same playing different roles.Anjur Chanhttp://www.blogger.com/profile/05866305346636051339noreply@blogger.com4tag:blogger.com,1999:blog-640595240992391619.post-11382975988286596132008-08-10T01:02:00.000-07:002008-08-10T01:18:21.548-07:00NARAYANAN- NARA + AYANNARA meaning Water in Sanskrit. AYANA meaning sleep/reside/meditate in Sanskrit. NARAYANAN is one who sleeps on water.Anjur Chanhttp://www.blogger.com/profile/05866305346636051339noreply@blogger.com0tag:blogger.com,1999:blog-640595240992391619.post-54272436883292507782008-08-10T00:16:00.000-07:002008-08-10T00:45:12.477-07:00OM NAMO NARAYANAYA<strong></strong>Say it again and again ! The mantra that purifies your mind, thoughts and body. You see it in every Vishnu temple. This mantra has lots of link with a place called Thirukostiyur near Karaikudi in Tamil Nadu. Sri Ramanajua learned this manthra from his guru in exchange of a promise on Shri Lakshmi Narasimha Murthy (Avathar of Lord Vishnu) that he won't say it out for common people. The moment he learned this mantra from his guru he yelled it sitting on top of the Thirukostiyour temple. Sri Ramanuja wants every human to know this mantra and get his soul purified saying this mantra again and again. Eventually his guru realized that its a great mistake from his part for not saying this mantra out and keeping it known to a very closed circle. He praised Shri Ramanuja then.<br /><br />Thirukostiyur temple is one of the 108 sacred Vishnu temples and speaks about the unique shaped architecture of the ancient kings of Tamil Nadu. Thirumeiyyam another great temple of Lord Vishnu is located near Thirukostiyur. Thirumeiyyam is also one of the 108 sacred Vishnu temples.Anjur Chanhttp://www.blogger.com/profile/05866305346636051339noreply@blogger.com0