<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Jerlinworld&#039;s Blog</title>
	<atom:link href="http://jerlinworld.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jerlinworld.wordpress.com</link>
	<description>Weblog from JerlinWorld!!!</description>
	<lastBuildDate>Wed, 11 Jan 2012 17:22:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jerlinworld.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Jerlinworld&#039;s Blog</title>
		<link>http://jerlinworld.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jerlinworld.wordpress.com/osd.xml" title="Jerlinworld&#039;s Blog" />
	<atom:link rel='hub' href='http://jerlinworld.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Own ID Column for the Model in the Play! Framework</title>
		<link>http://jerlinworld.wordpress.com/2012/01/11/own-id-column-for-the-model-in-the-play-framework/</link>
		<comments>http://jerlinworld.wordpress.com/2012/01/11/own-id-column-for-the-model-in-the-play-framework/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 17:22:14 +0000</pubDate>
		<dc:creator>jerlinworld</dc:creator>
				<category><![CDATA[Java/ J2EE]]></category>
		<category><![CDATA[Play Framework]]></category>

		<guid isPermaLink="false">http://jerlinworld.wordpress.com/?p=148</guid>
		<description><![CDATA[When you create Model entities in the Play! Framework, Play will provide a default id column.  If you need to use your own id column &#8212; say if you are given a database schema to work with &#8212; then you should extend a different Play class called GenericModel instead of Model class.  In addition to providing an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=148&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When you create Model entities in the Play! Framework, Play will provide a default id column.  If you need to use your own id column &#8212; say if you are given a database schema to work with &#8212; then you should extend a different Play class called GenericModel instead of Model class.  In addition to providing an @Id annotation, it also provides @GeneratedValue annotation. Here is its usage both with  Oracle and MySql.<br />
MySql</p>
<p><pre class="brush: java;">
@Entity
public class Tutorial extends GenericModel {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
public Long tutorial_id;
</pre></p>
<p>Oracle</p>
<p><pre class="brush: java;">
@Id
@GeneratedValue(strategy=SEQUENCE, generator=&quot;videoIdSeq&quot;)
@SequenceGenerator(name=&quot;videoId&quot;, sequenceName=&quot;video_id_seq&quot;, allocationSize=1)
@Column(name=&quot;video_id&quot;)
protected Long videoId;
</pre></p>
<br />Filed under: <a href='http://jerlinworld.wordpress.com/category/java-j2ee/'>Java/ J2EE</a>, <a href='http://jerlinworld.wordpress.com/category/play-framework/'>Play Framework</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jerlinworld.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jerlinworld.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jerlinworld.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jerlinworld.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jerlinworld.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jerlinworld.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jerlinworld.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jerlinworld.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jerlinworld.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jerlinworld.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jerlinworld.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jerlinworld.wordpress.com/148/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jerlinworld.wordpress.com/148/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jerlinworld.wordpress.com/148/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=148&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jerlinworld.wordpress.com/2012/01/11/own-id-column-for-the-model-in-the-play-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6773822fe1a840c6a78523964cc8703?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jerry Jacob</media:title>
		</media:content>
	</item>
		<item>
		<title>Create zip files in Java</title>
		<link>http://jerlinworld.wordpress.com/2012/01/11/create-zip-files-in-java/</link>
		<comments>http://jerlinworld.wordpress.com/2012/01/11/create-zip-files-in-java/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 17:21:29 +0000</pubDate>
		<dc:creator>jerlinworld</dc:creator>
				<category><![CDATA[Java/ J2EE]]></category>

		<guid isPermaLink="false">http://jerlinworld.wordpress.com/?p=179</guid>
		<description><![CDATA[The output of the below Java program will be the creation of a zip file inside c:/ with the name test.zip Taken from http://extreme-java.com Filed under: Java/ J2EE<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=179&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The output of the below Java program will be the creation of a zip file inside c:/ with the name test.zip<br />
Taken from http://extreme-java.com<br />
<pre class="brush: java;">


package com.example;
 
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
 
/** This class is a Java tutorial for creating zip file
 * 
 * @author Extreme Java
 */
public class Test{
 
	/** The method creates zip file and also creates an entry inside it
	 * 
	 * @param args is the command line arguments
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException  {
		//create a file output stream
		FileOutputStream zipFOS = new FileOutputStream(&quot;c://test.zip&quot;);
 
		//create a zip output stream from the file output stream created above.
		//zip output stream decorates file output stream
		ZipOutputStream zipoutStream = new ZipOutputStream(zipFOS);
 
		//creates an zip entry. You can create as many entries as you wish
		//Each entry represent a file with in the zip archive
		ZipEntry zipEntry = new ZipEntry(&quot;source1&quot;);
 
		//put the zip entry create above into the zip file
		zipoutStream.putNextEntry(zipEntry);
 
		//write some text into the zip entry created above.
		//Whatever is written will be added to last added zip entry
		zipoutStream.write(1);
 
		//close the zip entry.
		zipoutStream.closeEntry();
 
		//Finish the creation of zip file.
		zipoutStream.finish();
 
		//close the file output stream
		zipFOS.close();
 
		//close the zip output stream
		zipoutStream.close();
	}
}
</pre></p>
<br />Filed under: <a href='http://jerlinworld.wordpress.com/category/java-j2ee/'>Java/ J2EE</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jerlinworld.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jerlinworld.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jerlinworld.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jerlinworld.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jerlinworld.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jerlinworld.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jerlinworld.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jerlinworld.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jerlinworld.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jerlinworld.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jerlinworld.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jerlinworld.wordpress.com/179/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jerlinworld.wordpress.com/179/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jerlinworld.wordpress.com/179/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=179&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jerlinworld.wordpress.com/2012/01/11/create-zip-files-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6773822fe1a840c6a78523964cc8703?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jerry Jacob</media:title>
		</media:content>
	</item>
		<item>
		<title>Reading and Writing from/ to a file using javascript</title>
		<link>http://jerlinworld.wordpress.com/2010/10/12/reading-writing-from-to-a-file-using-javascript/</link>
		<comments>http://jerlinworld.wordpress.com/2010/10/12/reading-writing-from-to-a-file-using-javascript/#comments</comments>
		<pubDate>Tue, 12 Oct 2010 16:36:15 +0000</pubDate>
		<dc:creator>jerlinworld</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jerlinworld.wordpress.com/?p=129</guid>
		<description><![CDATA[Filed under: Uncategorized<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=129&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><pre class="brush: jscript;">

var hello='Hello '; 
var world='World'; 

function WriteToFile() { 
var filename = 'c://hello.txt'; 
var fso = new ActiveXObject('Scripting.FileSystemObject'); 
if (fso.FileExists(filename)) { 
var a, forAppend, file; 
forAppend = 8; 
file = fso.OpenTextFile(filename, forAppend, false); 
file.WriteLine(world); 
file.WriteLine(hello); 
} 
else { 
var file = fso.CreateTextFile(filename, true); 
file.WriteLine(hello); 
file.WriteLine(world); 
} 
file.Close(); 
} 

function ReadFromFile() { 
var filename = 'c://hello.txt'; 
if (confirm('Do you want to see what we put on your computer?')) { 
var fso, a, forRead; 
forRead = 1; 
fso = new ActiveXObject('Scripting.FileSystemObject'); 
file = fso.OpenTextFile(filename, forRead, false); 
var world = file.readline(); 
var hello = file.readline(); 
file.Close(); 
document.write(world + '&lt;br&gt;'); 
document.write(hello); 
} 
} 
</pre></p>
<br />Filed under: <a href='http://jerlinworld.wordpress.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jerlinworld.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jerlinworld.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jerlinworld.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jerlinworld.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jerlinworld.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jerlinworld.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jerlinworld.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jerlinworld.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jerlinworld.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jerlinworld.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jerlinworld.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jerlinworld.wordpress.com/129/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jerlinworld.wordpress.com/129/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jerlinworld.wordpress.com/129/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=129&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jerlinworld.wordpress.com/2010/10/12/reading-writing-from-to-a-file-using-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6773822fe1a840c6a78523964cc8703?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jerry Jacob</media:title>
		</media:content>
	</item>
		<item>
		<title>Create Word Documents Using Jasper API</title>
		<link>http://jerlinworld.wordpress.com/2010/03/09/create-word-documents-using-jasper-api/</link>
		<comments>http://jerlinworld.wordpress.com/2010/03/09/create-word-documents-using-jasper-api/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 15:08:25 +0000</pubDate>
		<dc:creator>jerlinworld</dc:creator>
				<category><![CDATA[Java/ J2EE]]></category>
		<category><![CDATA[jasper java word .doc doc docx]]></category>

		<guid isPermaLink="false">http://jerlinworld.wordpress.com/?p=120</guid>
		<description><![CDATA[All the basics for creating a document using Jasper API remains the same except the Exporter. Please refer to my earlier post to create PDF and RTF reports. Given below is the code that would return the word document in byte array. NOTE: You have to use the jasper api version 3.5.x or higher Tip: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=120&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>All the basics for creating a document using Jasper API remains the same except the Exporter. Please refer to my earlier <a href="http://jerlinworld.wordpress.com/2009/07/22/create-pdf-and-rtf-reports-using-jasper-api/">post to create PDF and RTF reports</a>.</p>
<p>Given below is the code that would return the word document in byte array.<br />
NOTE: You have to use the jasper api version  3.5.x or higher</p>
<p><pre class="brush: java;">
public byte[] buildDocResume(final String ssnNumber) {

		final String sourceMethod = &quot;buildDocResume&quot;;
		ResumeEngineImpl.log.entering(ResumeEngineImpl.sourceClass,
				sourceMethod, ssnNumber);
		byte[] docResume = null;
		try {
			final Seeker seeker = this.getSeekerBySsn(ssnNumber);
			final JasperPrint jasperPrint = this.renderResume(seeker);

			final JRDocxExporter docExporter = new JRDocxExporter();
			final ByteArrayOutputStream docStream = new ByteArrayOutputStream();
			docExporter.setParameter(JRDocxExporterParameter.JASPER_PRINT,
					jasperPrint);
			docExporter.setParameter(JRDocxExporterParameter.OUTPUT_STREAM,
					docStream);
			docExporter.setParameter(JRDocxExporterParameter.FLEXIBLE_ROW_HEIGHT, Boolean.TRUE);
			docExporter.exportReport();
			docResume = docStream.toByteArray();
		} catch (final JRException e) {
			ResumeEngineImpl.log.logp(Level.WARNING,
					ResumeEngineImpl.sourceClass, sourceMethod,
					&quot;Exception caught:&quot;, e);
		} catch (final RuntimeException e) {
			ResumeEngineImpl.log.logp(Level.WARNING,
					ResumeEngineImpl.sourceClass, sourceMethod,
					&quot;Exception caught:&quot;, e);
		}

		return docResume;
	}
</pre></p>
<p>Tip: The generated word document will be formatted using several nested tables. If the property, JRDocxExporterParameter.FLEXIBLE_ROW_HEIGHT, is set to false, the table rows do not increase in height automatically and the user has to enlarge them manually in word.</p>
<br />Filed under: <a href='http://jerlinworld.wordpress.com/category/java-j2ee/'>Java/ J2EE</a> Tagged: <a href='http://jerlinworld.wordpress.com/tag/jasper-java-word-doc-doc-docx/'>jasper java word .doc doc docx</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jerlinworld.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jerlinworld.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jerlinworld.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jerlinworld.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jerlinworld.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jerlinworld.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jerlinworld.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jerlinworld.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jerlinworld.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jerlinworld.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jerlinworld.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jerlinworld.wordpress.com/120/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jerlinworld.wordpress.com/120/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jerlinworld.wordpress.com/120/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=120&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jerlinworld.wordpress.com/2010/03/09/create-word-documents-using-jasper-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6773822fe1a840c6a78523964cc8703?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jerry Jacob</media:title>
		</media:content>
	</item>
		<item>
		<title>Passing Arguments to .property file</title>
		<link>http://jerlinworld.wordpress.com/2010/02/24/passing-arguments-to-property-file/</link>
		<comments>http://jerlinworld.wordpress.com/2010/02/24/passing-arguments-to-property-file/#comments</comments>
		<pubDate>Wed, 24 Feb 2010 17:17:28 +0000</pubDate>
		<dc:creator>jerlinworld</dc:creator>
				<category><![CDATA[Java/ J2EE]]></category>
		<category><![CDATA[.property parameter argument java]]></category>

		<guid isPermaLink="false">http://jerlinworld.wordpress.com/?p=106</guid>
		<description><![CDATA[Property File Sample Jave Code using MessageFormat Filed under: Java/ J2EE Tagged: .property parameter argument java<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=106&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Property File Sample<br />
<pre class="brush: plain;">
app.welcome= Welcome {0} and {1}.
app.bye=Bye {0} and {1}.
</pre></p>
<p>Jave Code using MessageFormat<br />
<pre class="brush: java;">

String propText=resBundle.getString(&quot;app.welcome&quot;);
java.text.MessageFormat msgFormatter = new java.text.MessageFormat(propText);

// Write the dynamic args you want to replace 
Object[] messageArguments = {&quot;Jerry&quot;,&quot;Jacob&quot;};  
 
String finalText= msgFormatter.format(messageArguments);

</pre></p>
<br />Filed under: <a href='http://jerlinworld.wordpress.com/category/java-j2ee/'>Java/ J2EE</a> Tagged: <a href='http://jerlinworld.wordpress.com/tag/property-parameter-argument-java/'>.property parameter argument java</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jerlinworld.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jerlinworld.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jerlinworld.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jerlinworld.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jerlinworld.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jerlinworld.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jerlinworld.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jerlinworld.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jerlinworld.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jerlinworld.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jerlinworld.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jerlinworld.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jerlinworld.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jerlinworld.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=106&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jerlinworld.wordpress.com/2010/02/24/passing-arguments-to-property-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6773822fe1a840c6a78523964cc8703?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jerry Jacob</media:title>
		</media:content>
	</item>
		<item>
		<title>UTF-8: Encoding Fix</title>
		<link>http://jerlinworld.wordpress.com/2009/12/14/utf-8-encoding-fix/</link>
		<comments>http://jerlinworld.wordpress.com/2009/12/14/utf-8-encoding-fix/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 16:48:20 +0000</pubDate>
		<dc:creator>jerlinworld</dc:creator>
				<category><![CDATA[Java/ J2EE]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[internationalization]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[property file]]></category>
		<category><![CDATA[translation]]></category>
		<category><![CDATA[utf-8]]></category>

		<guid isPermaLink="false">http://jerlinworld.wordpress.com/?p=96</guid>
		<description><![CDATA[I was trying to get the non-ascii characters from my property file to render correctly in my jsp file. My original property file was encoded using UTF-8 with the spanish translations for my application. While rendering the page, I was getting a few garbled text instead of pulling the proper spanish text from the property [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=96&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was trying to get the non-ascii characters from my property file to render correctly in my jsp file. My original property file was encoded using UTF-8 with the spanish translations for my application. While rendering the page, I was getting a few garbled text instead of pulling the proper spanish text from the property file. Here is the simple fix that I came across after researching on it for the whole day. </p>
<p>1. Made a copy of my original property file, messages_es.properties, and named it messages_es.original.properties<br />
2. Run the file, messages_es.original.properties, through native2ascii to convert the characters to its unicode escape form. Here is the command line for this: native2ascii -encoding UTF-8 ages_es.original.properties messages_es.properties</p>
<p>This fix for the property file resolved my issues.</p>
<p>For more info, you may visit, http://java.sun.com/developer/JDCTechTips/2003/tt0506.html</p>
<br />Posted in Java/ J2EE Tagged: encoding, internationalization, java, property file, translation, utf-8 <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jerlinworld.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jerlinworld.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jerlinworld.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jerlinworld.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jerlinworld.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jerlinworld.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jerlinworld.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jerlinworld.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jerlinworld.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jerlinworld.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jerlinworld.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jerlinworld.wordpress.com/96/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jerlinworld.wordpress.com/96/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jerlinworld.wordpress.com/96/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=96&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jerlinworld.wordpress.com/2009/12/14/utf-8-encoding-fix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6773822fe1a840c6a78523964cc8703?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jerry Jacob</media:title>
		</media:content>
	</item>
		<item>
		<title>Navigation while using Tiles with JSF</title>
		<link>http://jerlinworld.wordpress.com/2009/10/15/navigation-while-using-tiles-with-jsf/</link>
		<comments>http://jerlinworld.wordpress.com/2009/10/15/navigation-while-using-tiles-with-jsf/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 15:27:44 +0000</pubDate>
		<dc:creator>jerlinworld</dc:creator>
				<category><![CDATA[Java/ J2EE]]></category>
		<category><![CDATA[faces]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jsf]]></category>
		<category><![CDATA[navigation]]></category>
		<category><![CDATA[navigation-rule]]></category>
		<category><![CDATA[rules]]></category>
		<category><![CDATA[tiles]]></category>

		<guid isPermaLink="false">http://jerlinworld.wordpress.com/?p=85</guid>
		<description><![CDATA[I would like to post a tip while using Tiles with JSF. I had to spend a few hours to fix the navigation issue that I experianced while coding my App. I was using the body tile page for the &#8216;from-view-id&#8217; element while coding the navigation rule. This is wrong and we should be using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=85&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I would like to post a tip while using Tiles with JSF. I had to spend a few hours to fix the navigation issue that I experianced while coding my App.</p>
<p>I was using the body tile page for the &#8216;from-view-id&#8217; element while coding the navigation rule. This is wrong and we should be using the actual page name.</p>
<p>Incorrect value for &#8216;from-view-id&#8217;<br />
<pre class="brush: xml;">
&lt;navigation-rule&gt;
		&lt;from-view-id&gt;/tilesContent/index_body.jsp&lt;/from-view-id&gt;
		&lt;navigation-case&gt;
			&lt;from-action&gt;#{index.loginAction}&lt;/from-action&gt;
			&lt;from-outcome&gt;success&lt;/from-outcome&gt;
			&lt;to-view-id&gt;/login.jsp&lt;/to-view-id&gt;
		&lt;/navigation-case&gt;
	&lt;/navigation-rule&gt;
</pre></p>
<p>Correct value for &#8216;from-view-id&#8217;<br />
<pre class="brush: xml;">
&lt;navigation-rule&gt;
		&lt;from-view-id&gt;/index.jsp&lt;/from-view-id&gt;
		&lt;navigation-case&gt;
			&lt;from-action&gt;#{index.loginAction}&lt;/from-action&gt;
			&lt;from-outcome&gt;success&lt;/from-outcome&gt;
			&lt;to-view-id&gt;/login.jsp&lt;/to-view-id&gt;
		&lt;/navigation-case&gt;
	&lt;/navigation-rule&gt;
</pre></p>
<br />Posted in Java/ J2EE Tagged: faces, java, jsf, navigation, navigation-rule, rules, tiles <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jerlinworld.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jerlinworld.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jerlinworld.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jerlinworld.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jerlinworld.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jerlinworld.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jerlinworld.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jerlinworld.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jerlinworld.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jerlinworld.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jerlinworld.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jerlinworld.wordpress.com/85/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jerlinworld.wordpress.com/85/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jerlinworld.wordpress.com/85/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=85&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jerlinworld.wordpress.com/2009/10/15/navigation-while-using-tiles-with-jsf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6773822fe1a840c6a78523964cc8703?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jerry Jacob</media:title>
		</media:content>
	</item>
		<item>
		<title>Calling Java Web Service from VB 6.0</title>
		<link>http://jerlinworld.wordpress.com/2009/09/24/calling-java-web-service-from-vb-6-0/</link>
		<comments>http://jerlinworld.wordpress.com/2009/09/24/calling-java-web-service-from-vb-6-0/#comments</comments>
		<pubDate>Thu, 24 Sep 2009 14:10:31 +0000</pubDate>
		<dc:creator>jerlinworld</dc:creator>
				<category><![CDATA[Visual Basic]]></category>
		<category><![CDATA[web service java vb jerry jacob]]></category>

		<guid isPermaLink="false">http://jerlinworld.wordpress.com/?p=71</guid>
		<description><![CDATA[Given below is the code that I used successfully in my VB Application that call the Java web service. Posted in Visual Basic Tagged: web service java vb jerry jacob<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=71&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Given below is the code that I used successfully in my VB Application that call the Java web service.</p>
<p><pre class="brush: vb;">

Public Function ValidateSSN(ByVal Domain As String) As String
    Dim strSoapAction As String
    Dim strUrl As String
    Dim strXml As String

    strUrl = &quot;http://&quot; + Domain + &quot;/JobRepository/services/DetermineJobCode&quot;
    strSoapAction = &quot;http://www.jerryjacob.com/JobRepositoryWS/getOccupations&quot;
    strXml = &quot;&lt;?xml version=&quot;&quot;1.0&quot;&quot; encoding=&quot;&quot;utf-8&quot;&quot;?&gt;&quot; &amp; _
            &quot;&lt;soapenv:Envelope xmlns:soapenv=&quot;&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&quot; xmlns:job=&quot;&quot;http://www.jerryjacob.com/JobRepositoryWS/&quot;&quot;&gt;&quot; &amp; _
            &quot;&lt;soapenv:Header/&gt;&quot; &amp; _
            &quot;&lt;soapenv:Body&gt;&quot; &amp; _
            &quot;&lt;job:getJobs&gt;&quot; &amp; _
            &quot;&lt;getJobsRequest&gt;&quot; &amp; _
            &quot;&lt;jobTitle&gt;Computer Programmers&lt;/jobTitle&gt;&quot; &amp; _
            &quot;&lt;maximumResults&gt;1&lt;/maximumResults&gt;&quot; &amp; _
            &quot;&lt;/getJobsRequest&gt;&quot; &amp; _
            &quot;&lt;/job:getJobs&gt;&quot; &amp; _
            &quot;&lt;/soapenv:Body&gt;&quot; &amp; _
            &quot;&lt;/soapenv:Envelope&gt;&quot;
 
    Debug.Print PostWebservice(strUrl, strSoapAction, strXml)
    ValidateSSN = PostWebservice(strUrl, strSoapAction, strXml)
End Function

</pre><br />
<pre class="brush: vb;">

Private Function PostWebservice(ByVal AsmxUrl As String, ByVal SoapActionUrl As String, ByVal XmlBody As String) As String
    Dim objDom As Object
    Dim objXmlHttp As Object
    Dim strRet As String
    Dim intPos1 As Integer
    Dim intPos2 As Integer
   
    On Error GoTo Err_PW
   
    ' Create objects to DOMDocument and XMLHTTP
    Set objDom = CreateObject(&quot;MSXML2.DOMDocument&quot;)
    Set objXmlHttp = CreateObject(&quot;MSXML2.XMLHTTP&quot;)
   
    ' Load XML
    objDom.async = False
    objDom.loadXML XmlBody

    ' Open the webservice
    objXmlHttp.open &quot;POST&quot;, AsmxUrl, False
   
    ' Create headings
    objXmlHttp.setRequestHeader &quot;Content-Type&quot;, &quot;text/xml; charset=utf-8&quot;
    objXmlHttp.setRequestHeader &quot;SOAPAction&quot;, SoapActionUrl
   
    ' Send XML command
    objXmlHttp.send objDom.xml

    ' Get all response text from webservice
    strRet = objXmlHttp.responseText

    ' Close object
    Set objXmlHttp = Nothing
   
    ' Extract result
    intPos1 = InStr(strRet, &quot;&lt;score&gt;&quot;) + 7
    intPos2 = InStr(intPos1, strRet, &quot;&lt;/score&gt;&quot;)
    If intPos1 &gt; 7 And intPos2 &gt; 0 Then
        strRet = Mid(strRet, intPos1, intPos2 - intPos1)
    End If
   
    ' Return result
    PostWebservice = strRet
   
Exit Function
Err_PW:
    PostWebservice = &quot;Error: &quot; &amp; Err.Number &amp; &quot; - &quot; &amp; Err.Description

End Function

</pre></p>
<br />Posted in Visual Basic Tagged: web service java vb jerry jacob <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jerlinworld.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jerlinworld.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jerlinworld.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jerlinworld.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jerlinworld.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jerlinworld.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jerlinworld.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jerlinworld.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jerlinworld.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jerlinworld.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jerlinworld.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jerlinworld.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jerlinworld.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jerlinworld.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=71&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jerlinworld.wordpress.com/2009/09/24/calling-java-web-service-from-vb-6-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6773822fe1a840c6a78523964cc8703?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jerry Jacob</media:title>
		</media:content>
	</item>
		<item>
		<title>Web Service Integration using JXPath</title>
		<link>http://jerlinworld.wordpress.com/2009/08/05/web-service-integration-using-jxpath/</link>
		<comments>http://jerlinworld.wordpress.com/2009/08/05/web-service-integration-using-jxpath/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 16:05:39 +0000</pubDate>
		<dc:creator>jerlinworld</dc:creator>
				<category><![CDATA[Java/ J2EE]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jerry jacob des moines]]></category>
		<category><![CDATA[jxpath]]></category>
		<category><![CDATA[xpath]]></category>

		<guid isPermaLink="false">http://jerlinworld.wordpress.com/?p=61</guid>
		<description><![CDATA[I was successful in integrating two web services using the JXPath API from Apache. My task was to generate a letter using the data obtained from a third party web service. I had to call another web service to get the letter template and the metadata that&#8217;s needed for printing the letter. Since these services [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=61&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was successful in integrating two web services using the JXPath API from Apache. My task was to generate a letter using the data obtained from a third party web service. I had to call another web service to get the letter template and the metadata that&#8217;s needed for printing the letter. Since these services were in no way related, I had to create a file; mapping the data items in our web service to the actual data in third party web service (key-value). Using this mapping file along with the JXPath API made the integration a piece of cake.</p>
<p>Now let me explain how the JXPath works. Consider this example:<br />
<pre class="brush: java;">
String city = (String)JXPathContext.newContext(vendor).
         getValue(&quot;locations[address/zipCode='90210']/address/city&quot;);
</pre><br />
This XPath expression is equivalent to the following Java code:<br />
<pre class="brush: java;">
String city = null;
Collection locations = vendor.getLocations();
Iterator it = locations.iterator();
while (it.hasNext()){
    Location location = (Location)it.next();
    String zipCode = location.getAddress().getZipCode();
    if (zipCode.equals(&quot;90210&quot;)){
      city = location.getAddress().getCity();
      break;
    }
}
</pre><br />
In my mapping file, I have my values stored as XPath strings. These XPath values were used to fetch the actual data from the third party web service using the JXPath API.</p>
<br />Posted in Java/ J2EE Tagged: j2ee, java, jerry jacob des moines, jxpath, xpath <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jerlinworld.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jerlinworld.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jerlinworld.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jerlinworld.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jerlinworld.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jerlinworld.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jerlinworld.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jerlinworld.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jerlinworld.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jerlinworld.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jerlinworld.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jerlinworld.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jerlinworld.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jerlinworld.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=61&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jerlinworld.wordpress.com/2009/08/05/web-service-integration-using-jxpath/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6773822fe1a840c6a78523964cc8703?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jerry Jacob</media:title>
		</media:content>
	</item>
		<item>
		<title>Querying the &#8216;IBM Content Manager On Demand&#8217; using ODWEK API</title>
		<link>http://jerlinworld.wordpress.com/2009/07/23/querying-the-ibm-content-manager-on-demand-using-odwek-api/</link>
		<comments>http://jerlinworld.wordpress.com/2009/07/23/querying-the-ibm-content-manager-on-demand-using-odwek-api/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 13:10:30 +0000</pubDate>
		<dc:creator>jerlinworld</dc:creator>
				<category><![CDATA[Java/ J2EE]]></category>
		<category><![CDATA[CMOD]]></category>
		<category><![CDATA[Content Manager]]></category>
		<category><![CDATA[j2ee]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jerry jacob des moines]]></category>
		<category><![CDATA[ODWEK]]></category>

		<guid isPermaLink="false">http://jerlinworld.wordpress.com/?p=46</guid>
		<description><![CDATA[The IBM Content Manager OnDemand Web Enablement Kit (ODWEK) API&#8217;s provide a development environment for client access to Content Manager OnDemand (OD) servers. This API provide access to Servers, Folders, Criteria, and Hits, making it easy for Web application developers to logon, search and retrieve OD content. Here is the code that I used to query the CMOD folder with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=46&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The IBM Content Manager OnDemand Web Enablement Kit (ODWEK) API&#8217;s provide a development environment for client access to Content Manager OnDemand (OD) servers. This API provide access to Servers, Folders, Criteria, and Hits, making it easy for Web application developers to logon, search and retrieve OD content. Here is the code that I used to query the CMOD folder with a specific criteria.<br />
<pre class="brush: java;">
private int validateClaimInfo(final String ssnNumber, final String cDate) {
	final int port = 2345;
	final ODServer odServer = new ODServer(new ODConfig());
	try {
		................. 
		.................
		//Logon to specified server
		odServer.setConnectType(ODConstant.CONNECT_TYPE_TCPIP);
		odServer.setServerName(this.cmodProps.getString(&quot;cmod.server&quot;) .trim());
		odServer.setPort(port);
		odServer.setUserId(this.cmodProps.getString(&quot;cmod.userid&quot;).trim());
		odServer.setPassword(this.cmodProps.getString(&quot;cmod.password&quot;).trim());
		odServer.initialize(&quot;ClaimsValidationHelper&quot;);
		odServer.logon();
		//Search Folder
		return this.isExistingClaim(odServer, ssnNumber, cDate);
	} catch (final ODException e) {
		if (e.getErrorId() == 2107) {
			this.logger.error(&quot;OnDemand server &quot; + odServer.getServerName()  + &quot; is alive but: &quot; + e.getErrorMsg());
		} else {
			this.logger.error(&quot; Error code: &quot; + e.getErrorId()+ &quot;Encountered error: &quot; + e.getErrorMsg());
   		}
  	} catch (final Exception e) {
   		e.printStackTrace();
	} finally {
		try {
    			odServer.logoff();
   		} catch (final Exception e) {
   		}
  		 odServer.terminate();
  	}
  	return 0;
 }
</pre><br />
<pre class="brush: java;">
private int isExistingClaim(final ODServer odServer, final String ssnNumber, final String cDate) {
	int isExisting = 0;
	try {
		//Opening the folder specified in the property file...
		final ODFolder folder = odServer.openFolder(this.cmodProps.getString(&quot;claimings.folder&quot;).trim());
		//Getting specified criteria...
		final ODCriteria odCriteriaSsn = folder.getCriteria(this.cmodProps.getString(&quot;criteria.ssn&quot;).trim());
		//Setting operand...
		odCriteriaSsn.setOperator(ODConstant.OPEqual);
		odCriteriaSsn.setSearchValue(ssnNumber);
		final ODCriteria odCriteriaCDate = folder.getCriteria(this.cmodProps.getString(&quot;criteria.cdate&quot;).trim());
		odCriteriaCDate.setOperator(ODConstant.OPEqual);
		odCriteriaCDate.setSearchValue(cDate);
		folder.search();
		this.logger.debug(&quot;Search results size: &quot;+ folder.searchCountHits());
		if (folder.searchCountHits() &amp;gt; 0) {
			isExisting = 1;
		}
	} catch (final ODException e) {
		this.logger.error(&quot;ODException: &quot; + e.getMessage(), e);
	} catch (final Exception e) {
		this.logger.error(&quot;Exception: &quot; + e.getMessage(), e);
	}
	return isExisting;
}
</pre></p>
<br />Posted in Java/ J2EE Tagged: CMOD, Content Manager, j2ee, java, jerry jacob des moines, ODWEK <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jerlinworld.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jerlinworld.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jerlinworld.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jerlinworld.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jerlinworld.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jerlinworld.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jerlinworld.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jerlinworld.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jerlinworld.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jerlinworld.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jerlinworld.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jerlinworld.wordpress.com/46/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jerlinworld.wordpress.com/46/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jerlinworld.wordpress.com/46/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jerlinworld.wordpress.com&amp;blog=8413997&amp;post=46&amp;subd=jerlinworld&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jerlinworld.wordpress.com/2009/07/23/querying-the-ibm-content-manager-on-demand-using-odwek-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/f6773822fe1a840c6a78523964cc8703?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Jerry Jacob</media:title>
		</media:content>
	</item>
	</channel>
</rss>
