<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4540594485530624092</id><updated>2012-02-03T10:18:01.776+07:00</updated><category term='Windows XP'/><category term='HtmlInputText'/><category term='Windows 2003'/><category term='Directory'/><category term='log4j:configuration'/><category term='Type'/><category term='Working'/><category term='jc211'/><category term='DNS'/><category term='Project Group'/><category term='JSP'/><category term='relative'/><category term='Connection'/><category term='restart'/><category term='consistent'/><category term='component library'/><category term='domain name'/><category term='Tag Class'/><category term='PCSC'/><category term='Limit'/><category term='Non Serializable'/><category term='Default'/><category term='Hibernate'/><category term='Bug'/><category term='webuijsf:button'/><category term='UIComponentELTag'/><category term='String'/><category term='Java Integer Exception'/><category term='getComponentType'/><category term='Windows'/><category term='Change'/><category term='date'/><category term='getPage'/><category term='Paste'/><category term='library'/><category term='WinMerge'/><category term='ASP.NET'/><category term='chrome'/><category term='InputText'/><category term='64'/><category term='{2}'/><category term='css'/><category term='ActiveX'/><category term='Start'/><category term='email'/><category term='backward'/><category term='ComponentType'/><category term='multiple projects'/><category term='compatible'/><category term='Error'/><category term='Turn Off'/><category term='getRendererType'/><category term='J2SE'/><category term='custom component'/><category term='Virtual Disk'/><category term='Tag Name'/><category term='tld'/><category term='Guest'/><category term='Shutdown'/><category term='Class'/><category term='Modify'/><category term='distributed'/><category term='stop'/><category term='TableRowGroup'/><category term='Clear'/><category term='{1}'/><category term='Event Notification'/><category term='Dir'/><category term='DSN Not Found'/><category term='Multiple Server'/><category term='URL'/><category term='Problems'/><category term='Design'/><category term='Rename'/><category term='Attribute'/><category term='NetBeans'/><category term='IIS'/><category term='root'/><category term='Renderer'/><category term='Issue'/><category term='Tomcat'/><category term='Valid'/><category term='Format'/><category term='Array'/><category term='Advanced'/><category term='Table'/><category term='Copy'/><category term='IE8'/><category term='backing bean'/><category term='session'/><category term='Java Card'/><category term='warn'/><category term='JSF'/><category term='Smart Card'/><category term='APDU'/><category term='project'/><category term='Failed'/><category term='With'/><category term='64Bit'/><category term='J2EE'/><category term='VisualSVN'/><category term='.NET'/><category term='isValid'/><category term='Undeploy'/><category term='META-INF'/><category term='Bean'/><category term='Java Bean'/><category term='XP'/><category term='Cache'/><category term='custom tag'/><category term='viewid'/><category term='map'/><category term='Graphical User Interface'/><category term='setValid'/><category term='2003'/><category term='Remote Desktop'/><category term='{0}'/><category term='User'/><category term='.NET Framework 1.1'/><category term='two repositories'/><category term='Byte'/><category term='Win'/><category term='Redeploy'/><category term='invalid'/><category term='Software'/><category term='domain'/><category term='Network Sharing'/><category term='Web Application'/><category term='Deploy'/><category term='userid'/><category term='Size'/><category term='Application'/><category term='repository'/><category term='Other Targets'/><category term='Windows 7'/><category term='debug'/><category term='Tag'/><category term='Arguments'/><category term='Custom'/><category term='Run Target'/><category term='static'/><category term='Target'/><category term='Visual'/><category term='DSN'/><category term='mapping'/><category term='context'/><category term='Java'/><category term='Component'/><category term='Google'/><category term='JDBC'/><category term='time'/><category term='log4j'/><category term='EMV Card'/><category term='Attributes'/><category term='Gemalto'/><category term='NB'/><category term='ValueExpression'/><category term='Visual JSF'/><category term='Install'/><category term='NetBeans 6.7'/><category term='Database'/><category term='Javadoc'/><category term='RendererType'/><category term='setPage'/><category term='Substitute'/><category term='Adding'/><category term='faces-config.xml'/><category term='Data Binding'/><category term='two'/><category term='create tag'/><category term='Custom Attribute'/><category term='ODBC'/><category term='MySql'/><category term='mail client'/><category term='faces'/><category term='Enum'/><category term='SVN'/><category term='password'/><category term='gmail'/><category term='Ant'/><category term='Login'/><category term='Compile'/><title type='text'>Nevaku</title><subtitle type='html'>Share any development materials</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>70</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-4528298472758944463</id><published>2012-01-11T14:00:00.001+07:00</published><updated>2012-01-11T14:04:30.811+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='domain'/><category scheme='http://www.blogger.com/atom/ns#' term='Login'/><category scheme='http://www.blogger.com/atom/ns#' term='userid'/><category scheme='http://www.blogger.com/atom/ns#' term='password'/><category scheme='http://www.blogger.com/atom/ns#' term='invalid'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='time'/><category scheme='http://www.blogger.com/atom/ns#' term='date'/><title type='text'>Login Problems to Windows Domain</title><content type='html'>My new laptop is running Windows 7, my old PC is running Windows XP, and our server is running Windows 2000 domain server. I'm able to connect using file share to my PC. I just type its address on Windows Explorer then it prompt for user id and passwords, then I can access files in the PC from the Laptop. However it didn't work with the server. It keeps shows dialog to enter user id and password and says that my user id and password is invalid.&lt;br /&gt;&lt;br /&gt;I try many settting of Windows 7 and follow so many suggestion from the internet, but it still does not work. The next day I see that my clock is wrong, I was mistakenly set PM for AM. So, I correct the time. After several hours, I try to access the server again. In case thing getting better, and it is. I can access it. My user id and password are granted.&lt;br /&gt;&lt;br /&gt;So, if you have problems login to Windows Domain, try to synchronize time between clients and server&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-4528298472758944463?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/4528298472758944463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=4528298472758944463' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/4528298472758944463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/4528298472758944463'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2012/01/login-problems-to-windows-domain.html' title='Login Problems to Windows Domain'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-8841654540011238582</id><published>2011-06-15T16:26:00.000+07:00</published><updated>2011-06-15T16:26:15.698+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VisualSVN'/><category scheme='http://www.blogger.com/atom/ns#' term='Failed'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='2003'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows 2003'/><category scheme='http://www.blogger.com/atom/ns#' term='SVN'/><title type='text'>VisualSVN Server Installation on Windows 2003</title><content type='html'>When I Install VisualSVN server on Windows 2003, It told me that it failed to start the service. If I click cancel, installation is rolled back. This is annoying. When I search on the web their suggestion was to grant permission on several directories/folders. When I look at services manager, VisualSVN service was log on as NETWORK_SERVICES. The easiest for me is to change the user to local system account and click apply. Back to installation, click retry now works well and installation complete.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-8841654540011238582?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/8841654540011238582/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=8841654540011238582' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/8841654540011238582'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/8841654540011238582'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2011/06/visualsvn-server-installation-on.html' title='VisualSVN Server Installation on Windows 2003'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-6701177384147066658</id><published>2011-04-15T14:03:00.000+07:00</published><updated>2011-04-15T14:03:50.499+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stop'/><category scheme='http://www.blogger.com/atom/ns#' term='Undeploy'/><category scheme='http://www.blogger.com/atom/ns#' term='Deploy'/><category scheme='http://www.blogger.com/atom/ns#' term='JSF'/><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><category scheme='http://www.blogger.com/atom/ns#' term='restart'/><category scheme='http://www.blogger.com/atom/ns#' term='Start'/><category scheme='http://www.blogger.com/atom/ns#' term='Tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>NetBeans - Tomcat - JSF</title><content type='html'>I develop web application using NetBeans, Tomcat, and JSF in Windows XP. Soon after several time debug-stop-debug-stop sequence, the NetBeans will failed to deploy my application to&amp;nbsp;Tomcat. Its already happen from the first time I develop application using NetBeans 6.0 and continue to be happening until now when I using NetBeans 6.9.1. I don't know why. It seems that there are some memory leaks or bad clean up during debug-stop-debug-stop process.&lt;br /&gt;&lt;br /&gt;Fortunatelly I found another that yet more stable. Instead of click Finish Debug button, I do undeploy my application from Services tab. Then I do deploy again to start debugging with modified codes. The Tomcat keeps running and NetBeans still hook the Tomcat process for debugging.&lt;br /&gt;&lt;br /&gt;So, I do debug-undeploy-deploy-undeploy-deploy....-stop Tomcat-close NetBeans. Between undeploy-deploy the NetBeans and Tomcat memory will keep grow. When it reach my memory limit, I still have to restart it. This still OK since I may not start it until the end of the day when I shut down my PC.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-6701177384147066658?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/6701177384147066658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=6701177384147066658' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/6701177384147066658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/6701177384147066658'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2011/04/netbeans-tomcat-jsf.html' title='NetBeans - Tomcat - JSF'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-1962623660933959180</id><published>2011-04-08T09:54:00.002+07:00</published><updated>2011-04-08T09:56:09.144+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Rename'/><category scheme='http://www.blogger.com/atom/ns#' term='Enum'/><category scheme='http://www.blogger.com/atom/ns#' term='Modify'/><category scheme='http://www.blogger.com/atom/ns#' term='compatible'/><category scheme='http://www.blogger.com/atom/ns#' term='Change'/><category scheme='http://www.blogger.com/atom/ns#' term='backward'/><title type='text'>Java - Safely Change Enum Name</title><content type='html'>When we define an Enum type, by the time the name may no longer appropiate. We want to rename it to some thing else. If it only be used by several class, then it would be no problems. Use java refactor to do it. However if it is inside a libray or widely used, then it was a bad idea to rename it. Many modules will be broken and failed to compile.&lt;br /&gt;&lt;br /&gt;We must provide a mechanism for backward compatibility. So for example I have the following Enum:&lt;br /&gt;&lt;br /&gt;public Enum ComputerType {PC, Laptop, NetBook, Tablet}&lt;br /&gt;&lt;br /&gt;I want to change Laptop with NoteBook:&lt;br /&gt;I change the enum to:&lt;br /&gt;&lt;br /&gt;public Enum ComputerType {PC, NoteBook, NetBook, Tablet;&lt;br /&gt;&amp;nbsp;&amp;nbsp;@Deprecated&lt;br /&gt;&amp;nbsp;&amp;nbsp;public static&amp;nbsp;ComputerType Laptop = NoteBook;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;This way old codes that are useing Laptop have more compatibility with the NoteBook.&lt;br /&gt;There is exception if there are codes that call Laptop.name() or Laptop.toString().&lt;br /&gt;It will now return NoteBook instead of Laptop.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-1962623660933959180?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/1962623660933959180/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=1962623660933959180' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1962623660933959180'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1962623660933959180'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2011/04/java-safely-change-enum-name.html' title='Java - Safely Change Enum Name'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-7713250581961262742</id><published>2010-11-18T10:17:00.000+07:00</published><updated>2010-11-18T10:17:12.587+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Compile'/><category scheme='http://www.blogger.com/atom/ns#' term='Cache'/><category scheme='http://www.blogger.com/atom/ns#' term='Directory'/><category scheme='http://www.blogger.com/atom/ns#' term='Issue'/><category scheme='http://www.blogger.com/atom/ns#' term='Problems'/><category scheme='http://www.blogger.com/atom/ns#' term='Clear'/><category scheme='http://www.blogger.com/atom/ns#' term='Dir'/><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>NetBeans - Clear Compilation Cache</title><content type='html'>NetBeans cache compilation result and use them to resolve links between components. Unfortunatelly, sometime this cache was not valid. The IDE can not resolve classes location nor libraries. It shows there are errors in .java files, eventhough it is OK when I compile the code. The problems are not the codes instead the it caused by invalid state of NetBeans cache.&lt;br /&gt;&lt;br /&gt;To solve this issue, locate the NetBeans user directory and go to sub directory&amp;nbsp;var\cache. Rename "index" dir into some thing else. You need to close the NetBeans IDE first. Then start the IDE again. It will re-create index dir with the fresh entries. Delete the renamed index dir.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-7713250581961262742?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/7713250581961262742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=7713250581961262742' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/7713250581961262742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/7713250581961262742'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/11/netbeans-clear-compilation-cache.html' title='NetBeans - Clear Compilation Cache'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-8866192487468151267</id><published>2010-09-29T23:54:00.000+07:00</published><updated>2010-09-29T23:54:36.540+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Working'/><category scheme='http://www.blogger.com/atom/ns#' term='WinMerge'/><category scheme='http://www.blogger.com/atom/ns#' term='two'/><category scheme='http://www.blogger.com/atom/ns#' term='two repositories'/><category scheme='http://www.blogger.com/atom/ns#' term='distributed'/><category scheme='http://www.blogger.com/atom/ns#' term='repository'/><category scheme='http://www.blogger.com/atom/ns#' term='SVN'/><category scheme='http://www.blogger.com/atom/ns#' term='With'/><title type='text'>Working With Two SVN Repositories</title><content type='html'>I use Subversion (SVN) as source code repository. However, the links from my home to my office is not reliable. I can't always successfully connect to my office server. So I install another SVN server in my PC at home.&lt;br /&gt;&lt;br /&gt;Now, the problem is how do I sync both repositories? I read that there are distributed source controls such as Mercurial, git, or SVK that can work locally as well as centrally. I have no time to install them, then find out how to link them. Furthermore, I must also learn if there are any conflicts between local and office servers.&lt;br /&gt;&lt;br /&gt;Finally I just use WinMerge. I already use it as Diff tool for my SVN. So, I don't have to learn anything new. What I do is simple. I have two working copy, one for local, another one for office. I only need to make sure that both of them is equal. Whenever changes is made, I use WinMerge to compare them. It already provide useful filters such as binary files and SVN files. I can easily compare both working copy, merge them, and commit them to both repositories.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-8866192487468151267?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/8866192487468151267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=8866192487468151267' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/8866192487468151267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/8866192487468151267'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/09/working-with-two-svn-repositories.html' title='Working With Two SVN Repositories'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-5025518777504005513</id><published>2010-09-17T17:09:00.040+07:00</published><updated>2010-09-17T17:51:33.347+07:00</updated><title type='text'>JSF Programming Part I</title><content type='html'>&lt;b&gt;Java Concepts&lt;/b&gt;&lt;br /&gt;-- Object: variable that hold pointer to data structure.&lt;br /&gt;-- Class: definition of data structure. A Class it self is an object. Contains fields (variable),&amp;nbsp;constant, inner class,&amp;nbsp;methods (function), constructor&lt;br /&gt;-- Instantiation: create an object from a class using new keyword or object factory.&lt;br /&gt;-- Abstract Class: can not be instantiated to an object. Usefull for base class libraries. Contains abstract methods that can not be defined yet.&lt;br /&gt;-- Interface: contract or protocol between classes. Usefull to reduce dependencies between classes. Contains only methods declarations and constants.&lt;br /&gt;-- &lt;a href="http://download.oracle.com/javase/tutorial/java/IandI/subclasses.html"&gt;Inheritance&lt;/a&gt;: create more specific classes from a more generic class.Use extends keyword.&lt;br /&gt;-- Implementation: write&amp;nbsp;methods&amp;nbsp;implementation of interface in classes. The classes will provide all methods that declared in the interface.&lt;br /&gt;-- Package:&amp;nbsp;organizes a set of related classes and interfaces.&lt;br /&gt;-- &lt;a href="http://download.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html"&gt;Scope&lt;/a&gt;: Public: anyone, Protected: only descendants, Private: only it self, Default: only inside a package.&lt;br /&gt;-- &lt;a href="http://download.oracle.com/javase/tutorial/java/javaOO/constructors.html"&gt;Constructor&lt;/a&gt;: special method to instantiated an object from a class.&lt;br /&gt;-- Other definition: &lt;a href="http://download.oracle.com/javase/tutorial/java/javaOO/nested.html"&gt;Inner Class&lt;/a&gt;, Anonymous Class, &lt;a href="http://download.oracle.com/javase/tutorial/java/javaOO/enum.html"&gt;enum&lt;/a&gt;, &lt;a href="http://download.oracle.com/javase/tutorial/java/IandI/final.html"&gt;final&lt;/a&gt;, &lt;a href="http://download.oracle.com/javase/tutorial/java/javaOO/classvars.html"&gt;static&lt;/a&gt;, Setter-Getter, &lt;a href="http://download.oracle.com/javase/tutorial/java/IandI/polymorphism.html"&gt;Polymorphism-Override&lt;/a&gt;, Overload, this, &lt;a href="http://download.oracle.com/javase/tutorial/java/IandI/super.html"&gt;super&lt;/a&gt;, &lt;a href="http://download.oracle.com/javase/tutorial/java/generics/index.html"&gt;Generic&lt;/a&gt;, Exception (try, catch, finally, throws), &lt;a href="http://download.oracle.com/javase/tutorial/java/javaOO/annotations.html"&gt;Annotation&lt;/a&gt;, &lt;a href="http://download.oracle.com/javase/tutorial/reflect/index.html"&gt;Reflection&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://download.oracle.com/javase/tutorial/java/nutsandbolts/index.html"&gt;Java Language Basic&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://download.oracle.com/javase/tutorial/collections/index.html"&gt;Collections&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;-- List: ArrayList: dynamic array&lt;br /&gt;-- Map: HashMap: collection of key-value pair.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://download.oracle.com/javase/tutorial/jdbc/index.html"&gt;Database Access using JDBC&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;-- URL, Connection, Statement, ResultSet&lt;br /&gt;-- Custom FX&lt;br /&gt;-- Persistent Technology: JPA, Hibernate&lt;br /&gt;-- Connection Pool.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://download.oracle.com/javase/tutorial/javabeans/TOC.html"&gt;Java Bean (Component)&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;-- Properties: getter (get, is), setter (set)&lt;br /&gt;-- Events&lt;br /&gt;-- Persistence&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://download.oracle.com/javaee/5/tutorial/doc/geysj.html"&gt;Web Application&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;-- Accessed from Browser that request HTTP from a Web Server&lt;br /&gt;-- Static Files: Served by Web Server. HTML, CSS, Images, Scripts, ...&lt;br /&gt;-- Dynamic Content: generated by Container that can be Web Server it self of Web Server extension. Container can return any HTTP response including static files.&lt;br /&gt;-- Java Web Application Container: Tomcat, Glassfish&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;-- Stateless: Initiate, Request, Reply, Complete.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;-- Use cookies to manage session (not state)&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;-- State can be maintained in server only.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;-- State of components in Browser and&amp;nbsp;Server do&amp;nbsp;not always the same.&lt;br /&gt;-- Resource sharing: Application, Process, Thread, Memory, Disk, Connections&lt;br /&gt;-- Scope: Application, Session, Request, View State&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;b&gt;&lt;a href="http://download.oracle.com/javaee/5/tutorial/doc/bnaph.html"&gt;JSF Application&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;--&amp;nbsp;&lt;a href="http://download.oracle.com/javaee/5/tutorial/doc/bnafd.html"&gt;Servlet&lt;/a&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;--&amp;nbsp;&lt;a href="http://download.oracle.com/javaee/5/tutorial/doc/bnagx.html"&gt;JSP Technology&lt;/a&gt;&lt;/div&gt;&lt;div&gt;-- JSP File: Template of Web Pages. Requested by browser. Rendered by Container to produce HTTP response that usually HTML pages. It contains Tags.&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;-- Java File: Java (backing) beans that contain definition to render JSP File to HTTP response.&lt;/div&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;-- Configuration file: web.xml, faces-config.xml, *.tld&lt;br /&gt;-- Context: Application name: application root path.&lt;br /&gt;-- Initial Request vs Postback Request.&lt;br /&gt;-- Page Navigation: navigation-rule,&amp;nbsp;Transfer,&amp;nbsp;Redirection, Custom HTTP Response.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-5025518777504005513?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/5025518777504005513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=5025518777504005513' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5025518777504005513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5025518777504005513'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/09/jsf-programming.html' title='JSF Programming Part I'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-3160657164830516075</id><published>2010-09-16T17:29:00.000+07:00</published><updated>2010-09-16T17:29:08.301+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='map'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='context'/><category scheme='http://www.blogger.com/atom/ns#' term='viewid'/><category scheme='http://www.blogger.com/atom/ns#' term='mapping'/><category scheme='http://www.blogger.com/atom/ns#' term='URL'/><category scheme='http://www.blogger.com/atom/ns#' term='root'/><category scheme='http://www.blogger.com/atom/ns#' term='domain'/><category scheme='http://www.blogger.com/atom/ns#' term='static'/><category scheme='http://www.blogger.com/atom/ns#' term='faces'/><category scheme='http://www.blogger.com/atom/ns#' term='consistent'/><category scheme='http://www.blogger.com/atom/ns#' term='domain name'/><category scheme='http://www.blogger.com/atom/ns#' term='JSF'/><category scheme='http://www.blogger.com/atom/ns#' term='relative'/><category scheme='http://www.blogger.com/atom/ns#' term='css'/><title type='text'>Relative Url in JSP and CSS</title><content type='html'>In some cases It would be nice and easy if I can put url within CSS files or JSP pages. Unfortunatelly I can not use urls that are relative to the context. For example I have apage&amp;nbsp;which is accessed by using url: "http://localhost/myapp/faces/index.jsp". I also have another page: "http://localhost/myapp/faces/general/information.jsp". Both of them using an image header: "http://localhost/myapp/faces/images/header.jpg". The problem is how I write image url in the jsp pages? There are several alternatives:&lt;br /&gt;1. Using relative url from domain name: "/myapp/faces/images/header.jpg"&lt;br /&gt;I can apply this url for both pages "/index.jsp" and "/general/information.jsp". However there will be a problems if I change the context name to another one, e.g. mycompany. I have to change all "myapp" to "mycompany". Eventhough I can use find and replace, I think it is not nice.&lt;br /&gt;&lt;br /&gt;2. Using relative url from current page. I have to use "images/header.jpg" in "/index.jsp" and use "../images/header.jpg" in "/general/information.jsp". I don't like it to.&lt;br /&gt;&lt;br /&gt;3. Using JSF binding attribute to map relative url. I write "${Xpath.map['/images/header.jpg']}". I have to add Xpath managed bean and add a getMap() method like the following:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;public class Xpath {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public Xpath(){&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public HashMap&lt;string, string=""&gt; getMap(){&lt;/string,&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return new HashMap&lt;string, string=""&gt;(){&lt;/string,&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@Override&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public String get(Object key) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String sk = (String) key;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (sk == null){&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return sk;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}else if ("".equals(sk)){&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return sk;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}else if (sk.indexOf("/") != 0){&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return sk;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ServletContext sc = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return sc.getContextPath() + key;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;};&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The Xpath class must be registered in faces-config.xml to make it managed bean.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;managed-bean&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;managed-bean-name&amp;gt;Xpath&amp;lt;/managed-bean-name&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;managed-bean-class&amp;gt;myapp.Xpath&amp;lt;/managed-bean-class&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;managed-bean-scope&amp;gt;application&amp;lt;/managed-bean-scope&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/managed-bean&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I add getContextPath to the url so that it root is the context path not the domain name. The HashMap is needed to pass url to the getter. This solution can be applied to both pages and it does not care the current page. The only thing that I don't like is its ugly syntax.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;4. Using dummy url and let RequestHandler to convert it. I set image url to: "_root_/images/header.jpg". The root url does not actually exists. It just there as a marker that the url is relative to the root context. I create a class that implements &lt;a href="http://download.oracle.com/docs/cd/E17824_01/dsc_docs/docs/jscreator/apis/jsf/javax/faces/event/PhaseListener.html"&gt;PhaseListener&lt;/a&gt;. You can find in the internet how to implements a Phase Listener. Let's name it RequestHandler. Override its getPhaseId() method as follows:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public PhaseId getPhaseId() {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return PhaseId.RESTORE_VIEW;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Override afterPhase method to handle request:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void afterPhase(PhaseEvent event) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FacesContext context = event.getFacesContext();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// detect viewId to get which page is requested&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;String viewId = context.getViewRoot().getViewId();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (viewId.indexOf("/_root_/") &amp;lt; 0) {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// nothing handle request as usual&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;int ixres = viewId.lastIndexOf("/_root/");&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (ixres &amp;gt; 0){&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;viewId = viewId.substring(ixres);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;viewId = viewId.replaceAll("/_root/", "/");&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;transferView(viewId, context);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;and the transferView method is:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public static void transferView(String newView, FacesContext context){&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (context == null){&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;context = FacesContext.getCurrentInstance();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;context.setViewRoot(context.getApplication().getViewHandler().&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;createView(context, newView));&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;For me it seems complicated. The idea is that whenever a request contains "/_root_/" path, remove it and all other leading path. For "/index.jsp" the original viewId is "/_root_/images/header.jpg" and for "/general/information.jsp" the original viewId is "/general/_root_/images/header.jpg". It behave consistent through all pages in any path and it look nice too.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This also solve problem when we have to put url inside css. All we have to do is adding "_root_" keyword to the all urls.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-3160657164830516075?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/3160657164830516075/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=3160657164830516075' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/3160657164830516075'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/3160657164830516075'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/09/relative-url-in-jsp-and-css.html' title='Relative Url in JSP and CSS'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-828960164534152253</id><published>2010-09-15T14:38:00.000+07:00</published><updated>2010-09-15T14:38:42.749+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Java Bean'/><category scheme='http://www.blogger.com/atom/ns#' term='META-INF'/><category scheme='http://www.blogger.com/atom/ns#' term='library'/><category scheme='http://www.blogger.com/atom/ns#' term='Custom'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='faces-config.xml'/><category scheme='http://www.blogger.com/atom/ns#' term='project'/><category scheme='http://www.blogger.com/atom/ns#' term='custom tag'/><category scheme='http://www.blogger.com/atom/ns#' term='backing bean'/><category scheme='http://www.blogger.com/atom/ns#' term='Component'/><category scheme='http://www.blogger.com/atom/ns#' term='custom component'/><category scheme='http://www.blogger.com/atom/ns#' term='JSF'/><category scheme='http://www.blogger.com/atom/ns#' term='tld'/><category scheme='http://www.blogger.com/atom/ns#' term='component library'/><category scheme='http://www.blogger.com/atom/ns#' term='Bean'/><title type='text'>JSF Custom Tag and Component Library</title><content type='html'>I just create tags and their Java bean components. Next I move it to separate project as a class library. It is not an easy task. I spend a whole day to complete this. Well that may be because I need to find out some missing informations. This was what I did.&lt;br /&gt;-- First I move all necessary files to the new project.&lt;br /&gt;-- Then I need to add JSF, JSP, and Woodstock libraries. I need Woodstock to create table. It is a nice table compared to standard JSF. The jar that I add to the project libraries were: Java EE 6 API Library, Woodstock-components Library, jsf12-support. FYI, I use Tomcat 6.0.26 and JSF 1.2. It may be different if we use JSF 2.0 or GlassFish.&lt;br /&gt;-- Create META-INF folder (not a package) under Source Packages&lt;br /&gt;-- Create faces-config.xml that contains component configuration, and put it in META-INF. You have to name it &amp;nbsp;faces-config.xml. If you rename it to something else, like face-config-comp.xml, then you have to put&amp;nbsp;face-config-comp.xml in web.xml of each project that use the jar.&lt;br /&gt;-- Copy/Create tld file that contains tag lib definition to META-INF.&lt;br /&gt;&lt;br /&gt;Thats it. try to run the project to get the result.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-828960164534152253?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/828960164534152253/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=828960164534152253' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/828960164534152253'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/828960164534152253'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/09/jsf-custom-tag-and-component-library.html' title='JSF Custom Tag and Component Library'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-8539598685255015191</id><published>2010-09-14T14:15:00.000+07:00</published><updated>2010-09-14T14:15:00.589+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='setValid'/><category scheme='http://www.blogger.com/atom/ns#' term='HtmlInputText'/><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='UIComponentELTag'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='Attribute'/><category scheme='http://www.blogger.com/atom/ns#' term='Tag'/><category scheme='http://www.blogger.com/atom/ns#' term='InputText'/><category scheme='http://www.blogger.com/atom/ns#' term='ValueExpression'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Binding'/><category scheme='http://www.blogger.com/atom/ns#' term='J2SE'/><category scheme='http://www.blogger.com/atom/ns#' term='backing bean'/><category scheme='http://www.blogger.com/atom/ns#' term='Custom Attribute'/><category scheme='http://www.blogger.com/atom/ns#' term='JSF'/><category scheme='http://www.blogger.com/atom/ns#' term='Valid'/><category scheme='http://www.blogger.com/atom/ns#' term='tld'/><category scheme='http://www.blogger.com/atom/ns#' term='create tag'/><category scheme='http://www.blogger.com/atom/ns#' term='isValid'/><title type='text'>Valid Attribute for InputText Tag</title><content type='html'>It is annoying me to find out that &lt;a href="http://www.docjar.com/html/api/com/sun/faces/taglib/html_basic/InputTextTag.java.html"&gt;InputText&lt;/a&gt; tag of JSF/JSP does not have valid attribute. I can not set something like:&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;valid =&amp;nbsp;"#{Customer.valid}"&lt;/span&gt;&lt;br /&gt;in my JSP pages. It said that attribute valid invalid for InputText tag. The default backing bean of InputText which is&amp;nbsp;&lt;a href="http://www.docjar.com/html/api/javax/faces/component/html/HtmlInputText.java.html"&gt;HtmlInputText&lt;/a&gt; has setValid() and isValid() setter and getter methods.&lt;br /&gt;Usually I set the binding of InputText to HtmlInputText, and then set its valid property to true or false. However, I want to make it simple and do no want to create HtmlInputText for each InputText, while validating InputText.&lt;br /&gt;&lt;br /&gt;Finally, I create my own tag that was inherited from&amp;nbsp;UIComponentELTag. It is similar to InputText except that I add valid attribute and bind it with the&amp;nbsp;ValueExpression. I add valid field and setValid method:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;private javax.el.ValueExpression valid;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void setValid(javax.el.ValueExpression valid) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.valid = valid;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And then in setProperties method, I add:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (valid != null) {&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;input.setValueExpression("valid", valid);&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Also in my version of HtmlInputText I override the following two methods:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;@Override&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public boolean isValid() {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (getValueExpression("valid") != null){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return (Boolean) TagTool.get(getValueExpression("valid"));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}else{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return super.isValid();&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;@Override&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public void setValid(boolean valid) {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (getValueExpression("valid") != null){&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;TagTool.set(getValueExpression("valid"), valid);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}else{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;super.setValid(valid);&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;And this is my tag definition in tld. Note that I don't add all of InputText attribute. I add only some of them that I use.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;tag&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;xdbtext&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;tag-class&amp;gt;com.xlink.tag.XdbTextTag&amp;lt;/tag-class&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;body-content&amp;gt;JSP&amp;lt;/body-content&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;tei-class&amp;gt;com.sun.faces.taglib.FacesTagExtraInfo&amp;lt;/tei-class&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;id&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;required&amp;gt;false&amp;lt;/required&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;rtexprvalue&amp;gt;true&amp;lt;/rtexprvalue&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;value&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;required&amp;gt;false&amp;lt;/required&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;deferred-value&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;type&amp;gt;java.lang.Object&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/deferred-value&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;maxlength&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;required&amp;gt;false&amp;lt;/required&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;deferred-value&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;type&amp;gt;int&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/deferred-value&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;valid&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;required&amp;gt;false&amp;lt;/required&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;deferred-value&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;type&amp;gt;boolean&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/deferred-value&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;disabled&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;required&amp;gt;false&amp;lt;/required&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;deferred-value&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;type&amp;gt;boolean&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/deferred-value&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;style&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;required&amp;gt;false&amp;lt;/required&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;deferred-value&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;type&amp;gt;java.lang.String&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/deferred-value&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;name&amp;gt;styleClass&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;required&amp;gt;false&amp;lt;/required&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;deferred-value&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;type&amp;gt;java.lang.String&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/deferred-value&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/attribute&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/tag&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-8539598685255015191?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/8539598685255015191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=8539598685255015191' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/8539598685255015191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/8539598685255015191'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/09/valid-attribute-for-inputtext-tag.html' title='Valid Attribute for InputText Tag'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-2082922955047692819</id><published>2010-09-08T16:25:00.000+07:00</published><updated>2010-09-08T16:25:36.628+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSF'/><category scheme='http://www.blogger.com/atom/ns#' term='Component'/><category scheme='http://www.blogger.com/atom/ns#' term='getComponentType'/><category scheme='http://www.blogger.com/atom/ns#' term='Tag Class'/><category scheme='http://www.blogger.com/atom/ns#' term='Renderer'/><category scheme='http://www.blogger.com/atom/ns#' term='Class'/><category scheme='http://www.blogger.com/atom/ns#' term='Tag Name'/><category scheme='http://www.blogger.com/atom/ns#' term='getRendererType'/><category scheme='http://www.blogger.com/atom/ns#' term='Type'/><category scheme='http://www.blogger.com/atom/ns#' term='RendererType'/><category scheme='http://www.blogger.com/atom/ns#' term='Tag'/><category scheme='http://www.blogger.com/atom/ns#' term='ComponentType'/><title type='text'>Tag, Component And Renderer</title><content type='html'>I always wondering how a jsp tag can be rendered and uses certain component and render itself to be HTML tag. From table provided by&amp;nbsp;&lt;a href="http://www.horstmann.com/corejsf/standard-renderers.html"&gt;this table&lt;/a&gt;, there are&amp;nbsp;Tag name, Tag class, Component type, Component class, Renderer type, Renderer class. I will use &lt;h:inputtext&gt; sample for the rest of this articles.&amp;nbsp;&lt;/h:inputtext&gt;&lt;br /&gt;&lt;br /&gt;Tag name is the one that is typed into jsp pages: &lt;h:inputtext&gt;. The h prefix is come from the id of the tag uri. It is located on the same jsp page. Try to fing&amp;nbsp;xmlns:h="http://java.sun.com/jsf/html". You can use any other word than h. However it is the standard. So stick on it.&lt;/h:inputtext&gt;&lt;br /&gt;&lt;br /&gt;Tag class is the one that responsible to parse the tag name and its properties. Tag class is defined in the tld file. I use JSF 1.2, and the tld file: "html_basic.tld" is located in this file: "JSF 1.2 - jsf-impl.jar", in package: "META-INF". Open html_basic.tld file then search for inputText. Just several lines above it we will find &lt;tag-class&gt; which is:&amp;nbsp;com.sun.faces.taglib.html_basic.InputTextTag.&lt;/tag-class&gt;&lt;br /&gt;&lt;br /&gt;Component type and renderer type are defined within Tag Class: "com.sun.faces.taglib.html_basic.InputTextTag". To get both of them, we can create a dummy object of tag class then call&amp;nbsp;getComponentType()&amp;nbsp;and&amp;nbsp;getRenderedType(). Alternatively, you may see directly in its code which you can see from&amp;nbsp;&lt;a href="http://www.docjar.com/html/api/com/sun/faces/taglib/html_basic/InputTextTag.java.html"&gt;here&lt;/a&gt;. Search for&amp;nbsp;getComponentType()&amp;nbsp;and&amp;nbsp;getRenderedType(). Component type of InputText is&lt;br /&gt;"javax.faces.HtmlInputText". Renderer type of InputText is "&lt;span class="Apple-style-span" style="border-collapse: collapse;"&gt;javax.faces.Text".&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The concrete class of component type can be created by FacesContext.getCurrentInstance().getApplication().createComponent(ComponentType).&lt;br /&gt;&lt;br /&gt;Mapping of ComponentType to ComponentClass and RendererType to RendererClass are defined in xml file: "jsf-ri-runtime.xml" which is located in&amp;nbsp;this file: "JSF 1.2 - jsf-impl.jar", in package: "com.sun.faces". Search for those types to get their classes.&lt;br /&gt;&lt;br /&gt;Sounds complicated, yes it is.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-2082922955047692819?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/2082922955047692819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=2082922955047692819' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/2082922955047692819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/2082922955047692819'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/09/tag-component-and-renderer.html' title='Tag, Component And Renderer'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-6195010933948108166</id><published>2010-09-08T13:32:00.000+07:00</published><updated>2010-09-08T13:32:54.779+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NB'/><category scheme='http://www.blogger.com/atom/ns#' term='Ant'/><category scheme='http://www.blogger.com/atom/ns#' term='Target'/><category scheme='http://www.blogger.com/atom/ns#' term='Run Target'/><category scheme='http://www.blogger.com/atom/ns#' term='Other Targets'/><category scheme='http://www.blogger.com/atom/ns#' term='Advanced'/><category scheme='http://www.blogger.com/atom/ns#' term='Default'/><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>Netbeans - Ant Target</title><content type='html'>Netbeans uses some special ant target names to manage them. Here they are:&lt;br /&gt;-- Normal: standard ant target&lt;br /&gt;-- Italics:&amp;nbsp;A target that is imported from another Ant script using import tag e.g. &lt;import file="nbproject/build-impl.xml"&gt;&lt;/import&gt;&lt;br /&gt;--&amp;nbsp;Greyed out. An internal target that cannot be run directly. Internal targets have names beginning with '-'.&lt;br /&gt;-- Bold. The default target for the script, if there is one. The default target is declared as an attribute of the project, together with other project attributes, such as its name. You define the project's default attribute in the Source Editor.&lt;br /&gt;--&amp;nbsp;Emphasized Ant target. These targets include a description attribute, which is displayed as a tooltip. You define the target's description attribute in the Source Editor. e.g.&amp;nbsp;&lt;target description="build, then clean and do test" name="build-clean-tes"&gt;... &lt;/target&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-6195010933948108166?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/6195010933948108166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=6195010933948108166' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/6195010933948108166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/6195010933948108166'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/09/netbeans-ant-target.html' title='Netbeans - Ant Target'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-4658693489418898401</id><published>2010-08-25T15:54:00.001+07:00</published><updated>2010-08-25T15:55:17.076+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='{1}'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='{0}'/><category scheme='http://www.blogger.com/atom/ns#' term='Format'/><category scheme='http://www.blogger.com/atom/ns#' term='Arguments'/><category scheme='http://www.blogger.com/atom/ns#' term='{2}'/><category scheme='http://www.blogger.com/atom/ns#' term='Substitute'/><category scheme='http://www.blogger.com/atom/ns#' term='String'/><title type='text'>Java Substitute String</title><content type='html'>Java already has format function by MessageFormat to subtitute {n} inside string by arguments. For example:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;String str = "Name: {0}, Address: {1}, ZipCode: {2}";&lt;br /&gt;String fmt = MessageFormat.format(str, "Andi", "Java", "111000");&lt;br /&gt;// will produce fmt = "Name: Andi, Address: Java, ZipCode: 111000".&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Unfortunatelly, there are some feature that I make it complicated. For example, it will remove quote or combine two quotes become one. It also has special treatments with special char. Most of the time all I want to do is replace {n} with arguments, and leave all other char as is, including special charracters.&lt;br /&gt;&lt;br /&gt;So I create the function by my self as follows:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_4-SW9bXomUw/THTaOGt46WI/AAAAAAAAA3k/5PrgfKpZZRk/s1600/substitute.gif" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/_4-SW9bXomUw/THTaOGt46WI/AAAAAAAAA3k/5PrgfKpZZRk/s320/substitute.gif" width="251" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-4658693489418898401?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/4658693489418898401/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=4658693489418898401' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/4658693489418898401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/4658693489418898401'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/08/java-substitute-string.html' title='Java Substitute String'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_4-SW9bXomUw/THTaOGt46WI/AAAAAAAAA3k/5PrgfKpZZRk/s72-c/substitute.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-1212427205227003811</id><published>2010-08-18T11:31:00.000+07:00</published><updated>2010-08-18T11:31:35.425+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IE8'/><category scheme='http://www.blogger.com/atom/ns#' term='debug'/><category scheme='http://www.blogger.com/atom/ns#' term='ActiveX'/><title type='text'>Debugging ActiveX in IE8</title><content type='html'>Since I updgrade my IE to version-8, I was unable to debug ActiveX projects. It is caused by IE decoupled mechanism that may launch process for each tab. Initially there are two processes when IE8 starts. That is why my Visual Studio can not debug the correct process. The solution is simple, set registry to launch IE8 as single process in the following path:&lt;br /&gt;key: HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main&lt;br /&gt;entry: TabProcGrowth (DWORD) set to 0&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-1212427205227003811?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/1212427205227003811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=1212427205227003811' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1212427205227003811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1212427205227003811'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/08/debugging-activex-in-ie8.html' title='Debugging ActiveX in IE8'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-5514981289697771749</id><published>2010-08-09T10:20:00.001+07:00</published><updated>2010-08-09T10:21:18.578+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Size'/><category scheme='http://www.blogger.com/atom/ns#' term='Custom'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Remote Desktop'/><title type='text'>Custom Remote Desktop Window Size</title><content type='html'>I use Windows remote desktop frequently. Usually I don't use full screen mode, but I prefer the available widest screen. I need to be able to see and easily access task bar to click start menu or see notification tray icons. I was used to end up with 1024x768 resolution. After searching in internet I found out that it is possible to use other that default screen settings. Do the following thing:&lt;br /&gt;-- open remote desktop and save the connection settings to a file.&lt;br /&gt;-- open the file using notepad.&lt;br /&gt;-- find entry desktopwidth:i:1280 and desktopheight:i:864&lt;br /&gt;   The values will be different on your PC&lt;br /&gt;-- modify the value to set width and height.&lt;br /&gt;-- save, and double click the file to open remote desktop&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-5514981289697771749?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/5514981289697771749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=5514981289697771749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5514981289697771749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5514981289697771749'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/08/custom-remote-desktop-window-size.html' title='Custom Remote Desktop Window Size'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-2826880347185835038</id><published>2010-07-13T09:10:00.001+07:00</published><updated>2010-07-13T09:11:22.934+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Shutdown'/><category scheme='http://www.blogger.com/atom/ns#' term='Turn Off'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Hibernate'/><title type='text'>Windows - Automatic TurnOff</title><content type='html'>To Shutdown: shutdown -f -s -t 120. 10 mean delay for 10 second.&lt;br /&gt;To Hibernate: RUNDLL32.EXE PowrProf.dll,SetSuspendState. There are no delay, but can be put in windows scheduler to delay it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-2826880347185835038?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/2826880347185835038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=2826880347185835038' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/2826880347185835038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/2826880347185835038'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/07/windows-automatic-turnoff.html' title='Windows - Automatic TurnOff'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-3309134479167452747</id><published>2010-05-14T13:59:00.000+07:00</published><updated>2010-05-14T13:59:11.526+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DNS'/><category scheme='http://www.blogger.com/atom/ns#' term='Cache'/><category scheme='http://www.blogger.com/atom/ns#' term='Clear'/><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='Google'/><title type='text'>Google Chrome Browser - DNS Cache</title><content type='html'>I usually use Google Chrome as my regular web browser. One day when I open my favourite site: www.engadget.com. It was redirected to tvguide.com. It happen because there are some system errors in their network that cause invalid DNS. They already fix it, however when I try to open it on another day, I still got redirected. I tried to open using IE, and it works fine. This was confusing me.&lt;br /&gt;&lt;br /&gt;I thought it was a bug in Google Chrome, and it must be related with DNS lookup. It seems that it cache the DNS lookup for faster browsing. That was OK, but its developer should consider that DNS is only valid for within 24 hour. It has been days since DNS error happen. So I try to clear the cache. From options, Under the Hood, Clear Browsing Data, Empty the cache. &lt;br /&gt;&lt;br /&gt;Every things is OK now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-3309134479167452747?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/3309134479167452747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=3309134479167452747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/3309134479167452747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/3309134479167452747'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/05/google-chrome-browser-dns-cache.html' title='Google Chrome Browser - DNS Cache'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-2449530891562601583</id><published>2010-04-13T16:11:00.000+07:00</published><updated>2010-04-13T16:11:12.951+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ant'/><category scheme='http://www.blogger.com/atom/ns#' term='multiple projects'/><category scheme='http://www.blogger.com/atom/ns#' term='Javadoc'/><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>Generate Java Doc Of Multiple Projects</title><content type='html'>It is possible to call Ant files from one to another. I have to do it in the case of creating JavaDoc for my projects group. In the project group there are 14 projects. When I click a single button, I want to build all the projects to jar files, generate javadoc files, and zip all source into src files. At the end a project will produce project.jar, project-doc.zip and project-src.zip.&lt;br /&gt;&lt;br /&gt;Using NetBeans, I create a main project that links to other projects. When I build the main project, other projects are built too. The jars of others is put in dist/lib. Unfortunatelly This does not happen to javadoc. I have to create javadoc one by one project. For src its even worst. There is no default feature to this at all. Fortunatelly it is available in ant script.&lt;br /&gt;&lt;br /&gt;So, how do I have to build all javadocs in single click?&lt;br /&gt;Examining how build-impl.xml I found that for each depended object, there is task:&lt;br /&gt;&lt;br /&gt;&amp;lt;ant antfile="${other.project.dir}/build.xml" inheritall="false" target="javadoc" /&amp;gt; &lt;br /&gt;&lt;br /&gt;This task is used to call other build.xml in other project. The ${other.project.dir} base dir can be obtained from ${project.project_name} properties. For example, if other project name is "tool", then replace ${other.project.dir} with ${project.tool}. You may check the ${project.tool} value using ant task: "echoproperties"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-2449530891562601583?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/2449530891562601583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=2449530891562601583' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/2449530891562601583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/2449530891562601583'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/04/generate-java-doc-of-multiple-projects.html' title='Generate Java Doc Of Multiple Projects'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-4267420809205399867</id><published>2010-04-08T10:25:00.000+07:00</published><updated>2010-04-08T10:25:01.314+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JDBC'/><category scheme='http://www.blogger.com/atom/ns#' term='Format'/><category scheme='http://www.blogger.com/atom/ns#' term='URL'/><title type='text'>JDBC URL Format</title><content type='html'>Here are some JDBC Drivers and Url Formats list&lt;br /&gt;&lt;table style="border-style:solid;border-color: #ff0000;"&gt;&lt;tbody&gt;&lt;tr&gt; &lt;th&gt;Provider&lt;/th&gt;&lt;th&gt;library&lt;/th&gt;&lt;th&gt;Driver Name&lt;/th&gt;&lt;th&gt;URL Format&lt;/th&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;Sybase&lt;/td&gt;&lt;td&gt;jconnect55.jar&lt;/td&gt;&lt;td&gt;com.sybase.jdbc2.jdbc.SybDriver&lt;/td&gt; &lt;td&gt;jdbc:sybase:Tds:{server_ip}:{server_port}&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;Sybase&lt;/td&gt;&lt;td&gt;jconn3.jar&lt;/td&gt;&lt;td&gt;ccom.sybase.jdbc3.jdbc.SybDriver&lt;/td&gt; &lt;td&gt;jdbc:sybase:Tds:{server_ip}:{server_port}&lt;/td&gt; &lt;/tr&gt;&lt;tr&gt; &lt;td&gt;Oracle (By Service)&lt;/td&gt;&lt;td&gt;ojdbc14.jar&lt;/td&gt;&lt;td&gt;oracle.jdbc.OracleDriver&lt;/td&gt; &lt;td&gt;jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST={sercer_ip})(PORT={server_port}))(CONNECT_DATA=(SERVICE_NAME={service_name})))&lt;/td&gt; &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-4267420809205399867?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/4267420809205399867/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=4267420809205399867' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/4267420809205399867'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/4267420809205399867'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/04/jdbc-url-format.html' title='JDBC URL Format'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-7123266380037021619</id><published>2010-04-07T10:39:00.000+07:00</published><updated>2010-04-07T10:39:28.524+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='JSF'/><category scheme='http://www.blogger.com/atom/ns#' term='Bug'/><category scheme='http://www.blogger.com/atom/ns#' term='Paste'/><category scheme='http://www.blogger.com/atom/ns#' term='Copy'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Binding'/><title type='text'>JSF - Copy Paste Bugs</title><content type='html'>I often use copy and paste of codes, scripts, and tags. Especially when I have to copy similar buttons, text edits or other controls from one jsp to another. There is a bugs that I usually miss. It does not produce any errors but cause invalid data or strange behaviour.&lt;br /&gt;&lt;br /&gt;Some of my JSF tags contains binding attributes, such as:&amp;nbsp;binding="#{Page1.textEdit1}". When I copy the tag to let say Page2, then it should be&amp;nbsp;binding="#{Page2.textEdit1}". If I forget to change Page1 to Page2, the application still works but textEdit1 value in Page2.java will not be bound to the tag. Thus, any changes to the text edit will not be propagated to Page2, instead it is set to Page1. In addition Page1 bean is also instantiated, and its init() method will be called. If init() accessing any Session Bean variable, then things get worst.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-7123266380037021619?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/7123266380037021619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=7123266380037021619' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/7123266380037021619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/7123266380037021619'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/04/jsf-copy-paste-bugs.html' title='JSF - Copy Paste Bugs'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-1481759176953740825</id><published>2010-04-01T13:35:00.000+07:00</published><updated>2010-04-01T13:35:29.220+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='getPage'/><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='JSF'/><category scheme='http://www.blogger.com/atom/ns#' term='Table'/><category scheme='http://www.blogger.com/atom/ns#' term='TableRowGroup'/><category scheme='http://www.blogger.com/atom/ns#' term='setPage'/><title type='text'>TableRowGroup.setPage()</title><content type='html'>I use Table and TableRowGroup to display database table data. Some columns contain links that will navigate to other url when user click on it. When user click Cancel button in the new url, application will open original url that contains data in Table and TableRowGroup. I use paginate to reduce number of visible rows. My problems is that when user click link in table at page-n, let say page-4, when user brought back to the original url, the page is reset to 1. I want the url initially set TableRowGroup page to 4.&lt;br /&gt;&lt;br /&gt;There is setPage() method, and I try to call it from init() method. It does not work. Even when I use break point to watch getPage() return value, after I call setPage(), it always shows 1. When I see the TableRowGroup.java source code, it check getRows() and isPaginated() return value. If getRows() return 0 or isPagineted() return false, then setPage() will set nothing.&amp;nbsp;When I check this value in Watch window, both return 0 and false. This is strange since I set the Table to use paginate and the rows=13 in the .jsp file.&lt;br /&gt;&lt;br /&gt;Finally, I realize that init() is called before the url is rendered. The values in .jsp are not evaluated yet. The solution is adding in init() method, setRows(15) and setPaginated(true), then setPage(3) will work. I also realize that put TableRowGroup variable definition in SessionBean variable, will keep it instance across urls. When I do this, I don't even have to call setPage(). It stays in in session.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-1481759176953740825?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/1481759176953740825/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=1481759176953740825' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1481759176953740825'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1481759176953740825'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/04/tablerowgroupsetpage.html' title='TableRowGroup.setPage()'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-3418131984194490106</id><published>2010-03-30T15:42:00.000+07:00</published><updated>2010-03-30T15:42:29.834+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Adding'/><category scheme='http://www.blogger.com/atom/ns#' term='webuijsf:button'/><category scheme='http://www.blogger.com/atom/ns#' term='JSF'/><category scheme='http://www.blogger.com/atom/ns#' term='Custom'/><category scheme='http://www.blogger.com/atom/ns#' term='Tag'/><category scheme='http://www.blogger.com/atom/ns#' term='Attributes'/><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>JSF+NetBeans Adding Custom Attributes to webuijsf:button Tag</title><content type='html'>Most of jsf-jsp tags have fix attributes definition. You can not add custom attributes to them. For example:&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;lt;webuijsf:button custom1="adbc" custom2="def" text="Testing" /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The custom1 and custom2 attributes will trigger xml tag error and it won't be shown in rendered page. Is there other way to do that. It was not easy, but it can be done. We can use &amp;lt;webuijsf:markup then assign style, then adding attributes to getExtraAttributes() function return. However we have to create the button ourselves.&lt;br /&gt;&lt;br /&gt;Another approach is by override the tag and the button it self. To do that I will show how to create custom tag that are overriden from webuijsf:button. The tag would look like this&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;span class="Apple-style-span" style="font-size: small;"&gt;&amp;lt;xdb:xdbbutton custom1="adbc" custom2="def" text="Testing" /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We have to override ButtonTag and Button&amp;nbsp;classes.&lt;br /&gt;Create a new Class XdbButton and extend it from&amp;nbsp;com.sun.webui.jsf.component.Button&lt;br /&gt;&lt;br /&gt;&lt;div style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;"&gt;Create a HashMap member variable.&lt;/div&gt;&lt;div&gt;Create&amp;nbsp;public void put(String key, String val) method to accept key-value and put it to the map.&lt;/div&gt;&lt;div&gt;override encodeEnd method like the following codes:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_4-SW9bXomUw/S7Gwgw9Lw9I/AAAAAAAAAYA/1fFr7XNwYtQ/s1600/encodeEnd.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="116" src="http://2.bp.blogspot.com/_4-SW9bXomUw/S7Gwgw9Lw9I/AAAAAAAAAYA/1fFr7XNwYtQ/s200/encodeEnd.jpg" width="200" /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_4-SW9bXomUw/S7Gwgw9Lw9I/AAAAAAAAAYA/1fFr7XNwYtQ/s1600/encodeEnd.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_4-SW9bXomUw/S7Gwgw9Lw9I/AAAAAAAAAYA/1fFr7XNwYtQ/s1600/encodeEnd.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Next, &amp;nbsp;Create a new Class&amp;nbsp;XdbButtonTag&amp;nbsp;and extend it from com.sun.webui.jsf.component.ButtonTag and implements&amp;nbsp;DynamicAttributes interface.&lt;br /&gt;Override&amp;nbsp;getComponentType() and return "XdbButton" string.&lt;br /&gt;Create a HashMap member variable.&lt;br /&gt;In&amp;nbsp;setDynamicAttribute put localName and value to the HashMap.&lt;br /&gt;&lt;br /&gt;override doStartTag() and create method getValueExpression() like the following codes:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_4-SW9bXomUw/S7GtiYDBTHI/AAAAAAAAAXw/e4UZX9hCo04/s1600/doStartTag.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/_4-SW9bXomUw/S7GtiYDBTHI/AAAAAAAAAXw/e4UZX9hCo04/s1600/doStartTag.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="113" src="http://2.bp.blogspot.com/_4-SW9bXomUw/S7GtiYDBTHI/AAAAAAAAAXw/e4UZX9hCo04/s200/doStartTag.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_4-SW9bXomUw/S7GtoAwwODI/AAAAAAAAAX4/fHxkpi_ShLs/s1600/getValueExpression.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="44" src="http://4.bp.blogspot.com/_4-SW9bXomUw/S7GtoAwwODI/AAAAAAAAAX4/fHxkpi_ShLs/s200/getValueExpression.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Create a tld file, by right click project, click new, click other, select web category, select Tag Library Description. When the file open set the uri as you want, something like&amp;nbsp;http://mycompany.com/xdb. From the library, locate woodstock-components - webui-jsf.jar, expand it, then expan META-INF, open webui-jsf.tld. &amp;nbsp;Search for ButtonTag. copy and paste it to our tld file.&lt;br /&gt;Set the TagClass to&amp;nbsp;XdbButtonTag.&lt;br /&gt;add &amp;lt;dynamic-attributes&amp;gt;true&amp;lt;dynamic-attributes&amp;gt;&lt;br /&gt;&lt;br /&gt;Open faces-config.xml or you can create the new one.&lt;br /&gt;Add the following tag:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_4-SW9bXomUw/S7G4nVI0F4I/AAAAAAAAAYI/pG6Ps340fr8/s1600/faces-config.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="31" src="http://1.bp.blogspot.com/_4-SW9bXomUw/S7G4nVI0F4I/AAAAAAAAAYI/pG6Ps340fr8/s200/faces-config.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, open the page which we want to add the new tag, add&amp;nbsp;xmlns:xdb="http://mycompany.com/xdb" to schema definition in the top of the page. Then add our tag. &amp;lt;xdb:xdbbutton /&amp;gt;&lt;br /&gt;&lt;br /&gt;Good luck&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-3418131984194490106?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/3418131984194490106/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=3418131984194490106' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/3418131984194490106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/3418131984194490106'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/03/jsfnetbeans-adding-custom-attributes-to.html' title='JSF+NetBeans Adding Custom Attributes to webuijsf:button Tag'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_4-SW9bXomUw/S7Gwgw9Lw9I/AAAAAAAAAYA/1fFr7XNwYtQ/s72-c/encodeEnd.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-7004629515578140489</id><published>2010-03-22T13:58:00.001+07:00</published><updated>2010-03-22T13:58:59.902+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stop'/><category scheme='http://www.blogger.com/atom/ns#' term='Undeploy'/><category scheme='http://www.blogger.com/atom/ns#' term='restart'/><category scheme='http://www.blogger.com/atom/ns#' term='Redeploy'/><category scheme='http://www.blogger.com/atom/ns#' term='Start'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Application'/><category scheme='http://www.blogger.com/atom/ns#' term='Tomcat'/><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>NetBeans  - Undeploy Tomcat Web Application</title><content type='html'>&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px;"&gt;Past from : &lt;a href="http://stackoverflow.com/questions/543439/stop-tomcat-when-run-inside-of-netbeans"&gt;here&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; line-height: 18px;"&gt;Netbeans seems to struggle with controlling Tomcat generally, I've found. The more times the application is deployed, the more unstable Tomcat gets until I get a smilar problem to the one you described. On large applications it takes only one deployment. My workaround involves undeploying the application through the Services tab in Netbeans (under Servers/Tomcat6/applicationContext), and then stopping the Tomcat instance, before&amp;nbsp;&lt;em style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-size: 14px; font-style: italic; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;"&gt;every&lt;/em&gt;&amp;nbsp;time you run your application. If Netbeans can't undeploy the application, I direct my browser at the Tomcat manager web application (typically&lt;a href="http://localhost:8080/manager/html" rel="nofollow" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #0077cc; cursor: pointer; font-size: 14px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;http://localhost:8080/manager/html&lt;/a&gt;) and undeploying it from there. If Netbeans can't stop Tomcat, I kill the JVM that Tomcat is using (CTRL + ALT + DEL in Windows).&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-7004629515578140489?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/7004629515578140489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=7004629515578140489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/7004629515578140489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/7004629515578140489'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/03/netbeans-undeploy-tomcat-app.html' title='NetBeans  - Undeploy Tomcat Web Application'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-2604658838589923057</id><published>2010-03-22T06:55:00.001+07:00</published><updated>2010-03-22T06:56:43.164+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Guest'/><category scheme='http://www.blogger.com/atom/ns#' term='Login'/><category scheme='http://www.blogger.com/atom/ns#' term='Network Sharing'/><category scheme='http://www.blogger.com/atom/ns#' term='User'/><category scheme='http://www.blogger.com/atom/ns#' term='XP'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='Win'/><title type='text'>Connect to Windows XP by User Other Than Guest</title><content type='html'>When connecting to Windows XP sharing from other computer, than can be Windows, Linux, or Mac, some time the dialog only prompt login for GUEST user only. This is caused by client (the computer we tried to connect) setting. To enable other user login, we must change the client setting. Open client computer, open windows explorer. From Tools menu, click Folder Options, click View tab, scroll to the last item in the list. Uncheck "Use simple file sharing (Recommended)".&lt;br /&gt;&lt;br /&gt;Thats it. Try to connect again.&lt;br /&gt;&lt;br /&gt;Harun&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-2604658838589923057?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/2604658838589923057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=2604658838589923057' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/2604658838589923057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/2604658838589923057'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/03/connect-to-windows-xp-by-user-other.html' title='Connect to Windows XP by User Other Than Guest'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-1259879080540136854</id><published>2010-03-17T14:07:00.000+07:00</published><updated>2010-03-17T14:07:06.973+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mail client'/><category scheme='http://www.blogger.com/atom/ns#' term='email'/><category scheme='http://www.blogger.com/atom/ns#' term='gmail'/><category scheme='http://www.blogger.com/atom/ns#' term='chrome'/><category scheme='http://www.blogger.com/atom/ns#' term='session'/><title type='text'>GMail + Google Chrome</title><content type='html'>This not related to any programming material. I will share how to utilize gmail and chrome. Usually I use outlook express as my default mail client. However, its not easy to manages. I likes how gmail manages conversation and use labels to marks emails. I try to figure out how to use something like gmail client in desktop.&lt;br /&gt;&lt;br /&gt;I already have gmail account for non-work mailing activities. For my work I create another account. I use firefox when I open my first email. To easy access usually I check option to keep me logged in. So, I can not use firefox to open email account for work. I start to install Google Chrome for it. When I explore google chrome I found that using Gear I can work offline. It will sync email data when internet connection available. Wow, this is what I need.&lt;br /&gt;&lt;br /&gt;Now using Google Chrome to access Gmail account, I have desktop mail client that are exactly like gmail. I start thingking to use other mail account as well. However like firefox, "keep log in" feature can only applicable for one account, yet. After googling for a while, I found that using argument to launch Google Chrome like: --user-data-dir="SecondAccount", will start it in separate session. In addition I use --app option as well&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-1259879080540136854?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/1259879080540136854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=1259879080540136854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1259879080540136854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1259879080540136854'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/03/gmail-google-chrome.html' title='GMail + Google Chrome'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-5639512090614481953</id><published>2010-03-12T13:59:00.001+07:00</published><updated>2010-03-17T13:54:32.003+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Application'/><category scheme='http://www.blogger.com/atom/ns#' term='Event Notification'/><category scheme='http://www.blogger.com/atom/ns#' term='Software'/><category scheme='http://www.blogger.com/atom/ns#' term='Graphical User Interface'/><category scheme='http://www.blogger.com/atom/ns#' term='Design'/><title type='text'>GUI Development - Event Notification</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_4-SW9bXomUw/S5nC7VzszWI/AAAAAAAAAWo/oykGwqaVdYo/s1600-h/GUI+Components.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="147" src="http://1.bp.blogspot.com/_4-SW9bXomUw/S5nC7VzszWI/AAAAAAAAAWo/oykGwqaVdYo/s200/GUI+Components.JPG" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;I have developed many applications that require user interaction. It can be desktop (windows based) application or web application that run in browser. One of the problems in those applications are synchronizing values between component that represent an entity. Mostly an entity such as Card or Profile is represent by several component in "Tree Structure", "Table", or "Editor Panel". When users modify something in Editor Panel, application must synchronize display in Tree Structure, Table, and others. Things get more complicated when we have to cache the values to increase performance.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_4-SW9bXomUw/S5nfumcN55I/AAAAAAAAAWw/1wLiclXDwyY/s1600-h/Event+Notification+-+Register+All+Components.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="126" src="http://3.bp.blogspot.com/_4-SW9bXomUw/S5nfumcN55I/AAAAAAAAAWw/1wLiclXDwyY/s200/Event+Notification+-+Register+All+Components.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;I used to register all components to a hierarchical list of event listener. When something happen to entity, it will search components in the list. The components are group by their type and identities. If there are any matched type and identities then the components are notified to refresh their display. This design seems good, yet. When the number of components increases, the list become huge. There is also drawback to register and unregister components from the list. Some short-lived components (in quick view list pane) must also be registered-unregistered even if they only exists for several seconds. This is bad.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_4-SW9bXomUw/S5nicWHJUaI/AAAAAAAAAW4/91C_Q7pU1LI/s1600-h/Event+Notification+-+Register+Root+Components.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="118" src="http://2.bp.blogspot.com/_4-SW9bXomUw/S5nicWHJUaI/AAAAAAAAAW4/91C_Q7pU1LI/s200/Event+Notification+-+Register+Root+Components.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;So I try another approach. Instead of registering all components, I only register the component roots. There only some roots in application, which are the root node in tree structure, the table in quick view or find result, the container of tabbed panes, and so on. When an event happen, such as user renames something, the responsible entity broadcast it to components root. The component root that forward event to all of their children. This seem better but what happen if there are many children. If we only modify one entity, why we have to notify every one?&lt;br /&gt;&lt;br /&gt;We don't have to, or at least we can reduce notification traffic. We must put identities to components and create parent-child relation between root components, root children, grand children, and so on. Thus when event happen it is only broadcast to matched components ant their parents. The next problem is how do we decide parent of the matching components? How about put all parent identities to their children. The problems still happen when parent is modified. Do we have to notify all children to update their parent identities. We can do that complicated thing or simply remove the children and reload them.&lt;br /&gt;&lt;br /&gt;Is that all clear? not yet. One thing since we relay on parent list to propagate notification, the list should be available any time, including when new child created. We must assign parent list to it although its parents are not accessible yet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-5639512090614481953?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/5639512090614481953/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=5639512090614481953' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5639512090614481953'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5639512090614481953'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/03/gui-development-event-notification.html' title='GUI Development - Event Notification'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_4-SW9bXomUw/S5nC7VzszWI/AAAAAAAAAWo/oykGwqaVdYo/s72-c/GUI+Components.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-949381174056218941</id><published>2010-02-17T10:45:00.000+07:00</published><updated>2010-02-18T16:40:00.374+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySql'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><category scheme='http://www.blogger.com/atom/ns#' term='TableRowGroup'/><title type='text'>JSF Application - Database Access - IV</title><content type='html'>&lt;a href="http://nevaku.blogspot.com/2010/02/jsf-application-database-access-iii.html"&gt;back&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Edit and Delete columns contain link to edit and delete related row. When user click those links, it will call edit_action() or delete_action() method. Inside these methods, we need to get the current rows and its value for further process. Here is the code to retrieve current row values:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Object getRowValue(String colName) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RowKey rk = xlobjectTable.getRowKey();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CachedRowSetDataProvider dp = (CachedRowSetDataProvider) xlobjectTable.getSourceData();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return dp.getValue(colName, rk);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It returns object that you can convert or cast it to String or int or other types.&lt;br /&gt;If we want to edit the value in another page. Then we must put the value to a session bean. Create another session bean, and name it XLObject. Add fields using Add Property to hold current row value. Now create another Visual JSP page. Put controls and labels, and bind them to XLObject fields. Add button to Cancel or Save editing. To move from one page to another create and call the following method:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void redirect(String page, String ContextPath) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExternalContext ext = this.getExternalContext();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ContextPath == null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ContextPath = ext.getRequestContextPath() + "/faces";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ext.redirect(ContextPath + page);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.getFacesContext().responseComplete();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (IOException ex) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new RuntimeException(ex);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;for example, to open edit page when user click edit, call it:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;redirect("/EditPage.jsp", null);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;to go back to the Page1:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;redirect("/Page1.jsp", null);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Thats all things. Good luck.&lt;br /&gt;&lt;br /&gt;back&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-949381174056218941?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/949381174056218941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=949381174056218941' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/949381174056218941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/949381174056218941'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/02/jsf-application-database-access-iv.html' title='JSF Application - Database Access - IV'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-8074130925805211389</id><published>2010-02-17T10:44:00.001+07:00</published><updated>2010-02-18T16:38:45.348+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySql'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><category scheme='http://www.blogger.com/atom/ns#' term='TableRowGroup'/><title type='text'>JSF Application - Database Access - III</title><content type='html'>&lt;a href="http://nevaku.blogspot.com/2010/02/jsf-application-database-access-ii.html"&gt;back&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I will explain how to fill drop down list and table row group. Drop down list is bound to HtmlSelectOneMenu object. To fill it, basically we clear it, then add items one by one from result set. Here is the code to fill drop down from result set.&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (rs.next()) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UISelectItem item = new UISelectItem();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; item.setItemLabel(rs.getString(textFieldName));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; item.setItemValue(rs.getString(keyFieldName));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dropDown.getChildren().add(item);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It is better to encapsulate that syntax by a method. Call it from Page1.fillObjectTypeList() to fill ObjectTypeList drop down. To get DataAccess instance use the following method:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public static DataAccess get() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return (DataAccess) FacesContext.getCurrentInstance().getApplication()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .getVariableResolver().resolveVariable(&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FacesContext.getCurrentInstance(), "DataAccess");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The get() method is static. You can just call it like this: DataAccess.get().fillDropDown(sql, ObjectTypeList);&lt;br /&gt;&lt;br /&gt;To fill table row group see the following syntax.&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trg.setSourceData(null);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (rs == null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CachedRowSetXImpl cachedRowSet = new CachedRowSetXImpl();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cachedRowSet.setDataSourceName("java:comp/env/jdbc/xlink_MySQL");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cachedRowSet.populate(rs);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CachedRowSetDataProvider dp = new CachedRowSetDataProvider();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dp.setCachedRowSet(cachedRowSet);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; trg.setSourceData(dp);&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Put it inside a method and call the method from Page1.retrieve_action(). Use ObjectTypeList() and ObjectXID value as a filter in sql syntax.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://nevaku.blogspot.com/2010/02/jsf-application-database-access-iv.html"&gt;next&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-8074130925805211389?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/8074130925805211389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=8074130925805211389' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/8074130925805211389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/8074130925805211389'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/02/jsf-application-database-access-iii.html' title='JSF Application - Database Access - III'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-5920659086507552678</id><published>2010-02-17T10:43:00.006+07:00</published><updated>2010-02-18T16:38:35.165+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySql'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><category scheme='http://www.blogger.com/atom/ns#' term='TableRowGroup'/><title type='text'>JSF Application - Database Access - II</title><content type='html'>&lt;a href="http://nevaku.blogspot.com/2010/02/jsf-application-database-access-i.html"&gt;back &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We need additional library to connect to database. For example MySql provides mysql-connector-java-5.1.5-bin.jar that you can download it from &lt;a href="http://dev.mysql.com/downloads/connector/j/"&gt;here&lt;/a&gt;. From the Project tool box, expand your project, right click Libraries, click add JAR/Folders. Browse the file and click Open.&lt;br /&gt;&lt;br /&gt;There are some alternatives to access database. We can use simple way by creating a connection object, statement and execute query to get result set. Other ways are using persistent such as &lt;a href="http://java.sun.com/developer/technicalArticles/J2EE/jpa/"&gt;JPA&lt;/a&gt; or &lt;a href="https://www.hibernate.org/"&gt;Hibernate&lt;/a&gt;. We will use old way for this sample.&lt;br /&gt;&lt;br /&gt;Create a session bean object. Right click the project, click new, click other. Select JavaServer Faces category, then select Visual Web JSF Session Bean. Name it DataAccess, click Finish then open the DataAccess.java. We will define several functionality related to database access.&lt;br /&gt;&lt;br /&gt;We only need one connection for a session. From the first time users open browser, until they close it, we only create single connection for them. We put database connection initialization in DataAccess.init() method. Create connectDB() method and call it from init(). Here is the source code of new additional fields and connectDB method():&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private transient Connection Conn;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private Statement StmResult;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private Statement StmExecute;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void connectDB() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String jdbcDrv = "com.mysql.jdbc.Driver";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String jdbcUrl = "jdbc:mysql://127.0.0.1:3306/mydb";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Class.forName(jdbcDrv);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String dbuser = "root";&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String dbpwd = "mypwd";&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String dbconfig = "Session Bean1 Config Using: \n" +&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;nbsp; jdbc.Driver&amp;nbsp; :" + jdbcDrv + "\n" +&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;nbsp; jdbc.URL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; :" + jdbcUrl + "\n" +&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;nbsp; db user :" + dbuser;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.out.println(dbconfig);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Properties conprop = new Properties();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conprop.put("user", dbuser);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conprop.put("password", dbpwd);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conprop.put("useCompression", "true");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Conn = DriverManager.getConnection(jdbcUrl, conprop);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StmResult = null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StmExecute = null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (Exception ex) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new RuntimeException(ex);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You have to change several fields to match your database setting, such as: server IP, port, database name, user id and password. The following is code to execute SQL update and execute SQL that return Result set. It slightly different in function name and return value only.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void execute(String sql) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (StmExecute == null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StmExecute = Conn.createStatement();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (StmExecute == null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StmExecute.execute(sql);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (Exception ex) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new RuntimeException(ex);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public ResultSet executeResultSet(String sql) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (StmResult == null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; StmResult = Conn.createStatement();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (StmResult == null) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return StmResult.executeQuery(sql);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (SQLException ex) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; throw new RuntimeException(ex);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;We will use this function for any database access. You may see that we only use two statement object. One for Execute and one for Execute Query. Using single statement make sure that we don't waste resources. Most of the time we often forget to close Statement or Result Set. This can cause "Too Many Open File" error or even worst cause "Not Enough Memory" error. By reusing statement we should only care about that one. A statement will close previous result set when it is executed for the next time. So we don't have to close result set manually.&lt;br /&gt;&lt;br /&gt;There is disadvantage of reusing a statement that return result set. When it execute, it will close previous result set and return the new one. We can not use it inside loop that will execute statement while it is iterating outer result set. You will get error if you do the following syntax.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;String outersql = "select * from a"; // ... define sql query here&lt;br /&gt;ResultSet outerRs = executeResultSet(outersql);&lt;br /&gt;while (outerRs.next()){&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String innersql = "select * from b where fka = 'x' "; // define second sql here&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ResultSet innerRs = executeResultSet(innersql); // this syntax will close outerRs, and next iteration will failed&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (innerRs.next()){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // do other iteration&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://nevaku.blogspot.com/2010/02/jsf-application-database-access-iii.html"&gt;next&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-5920659086507552678?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/5920659086507552678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=5920659086507552678' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5920659086507552678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5920659086507552678'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/02/jsf-application-database-access-ii.html' title='JSF Application - Database Access - II'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-5030897218416708952</id><published>2010-02-17T10:43:00.005+07:00</published><updated>2010-02-18T16:38:21.179+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySql'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><category scheme='http://www.blogger.com/atom/ns#' term='TableRowGroup'/><title type='text'>JSF Application - Database Access - I</title><content type='html'>In this post, we will add database access to Visual JSF Application. The application will contains several text field, drop down, and table to display and modify database table contents. Create a new project and open Page1.jsp. Add controls like the picture below:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_4-SW9bXomUw/S3NsaZIpkgI/AAAAAAAAAV8/kg_NfrltLNw/s1600-h/table+layout.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5436808375845884418" src="http://4.bp.blogspot.com/_4-SW9bXomUw/S3NsaZIpkgI/AAAAAAAAAV8/kg_NfrltLNw/s320/table+layout.jpg" style="cursor: pointer; height: 126px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Add Output Text, Text Field, Button, and Dropdown List from standard palette. Add table from Woodstock Basic palette. Rename dropdown Id to objectTypeList, button Id to retrieve. Right click the dropdown then click Add Binding Attribute. Click the table, from Navigator tool box, expand the table and click table row group. Rename it Id to xlobjectTable. Right click the table row group click Add Binding Attribute. See the picture below.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_4-SW9bXomUw/S3pwwJpZ0FI/AAAAAAAAAWU/TYMDFGAi7po/s1600-h/navigator+table+row+group.jpg" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5438783472528904274" src="http://2.bp.blogspot.com/_4-SW9bXomUw/S3pwwJpZ0FI/AAAAAAAAAWU/TYMDFGAi7po/s320/navigator+table+row+group.jpg" style="cursor: pointer; height: 196px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Add Binding Attribute will automatically create variable in Java class and bind the tag to that variables. Standard Tag and class mapping can be found in tag documentation. For JSF 1.2 see it &lt;a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/tlddocs/index.html"&gt;here&lt;/a&gt;, and for JSF 2.0 see it &lt;a href="http://java.sun.com/javaee/javaserverfaces/2.0/docs/pdldocs/jsp/index.html"&gt;here&lt;/a&gt;. For webui (woodstock) tag you can see it &lt;a href="http://www.google.com/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Go to JSP view, modify xml structure of the table so that it will look like the following:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_4-SW9bXomUw/S3pebmDFW5I/AAAAAAAAAWM/mW5utaBjiEg/s1600-h/table+xml.JPG" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5438763328166255506" src="http://4.bp.blogspot.com/_4-SW9bXomUw/S3pebmDFW5I/AAAAAAAAAWM/mW5utaBjiEg/s320/table+xml.JPG" style="cursor: pointer; height: 134px; width: 320px;" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now go to Java view to add several fields and functions. Add the following field from Add Property menu:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;private int ObjectXID = 0;&lt;br /&gt;private int ObjectType = 0;&lt;br /&gt;private String Description = "";&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;then add the following functions:&lt;br /&gt;&lt;br /&gt;private void initPage() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (isPostBack()){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fillObjectTypeList();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjectType = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ObjectXID = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description = "";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void fillObjectTypeList() {}&lt;br /&gt;public String retrieve_action() {}&lt;br /&gt;public void edit_action(ActionEvent event) {}&lt;br /&gt;public void delete_action(ActionEvent event) {}&lt;br /&gt;&lt;br /&gt;call initPage() from init() functions as usual.&lt;br /&gt;&lt;br /&gt;Make sure there are no errors, then run the application. It still empty and static application. We will add connection to database and access data from database.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://nevaku.blogspot.com/2010/02/jsf-application-database-access-ii.html"&gt;next&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-5030897218416708952?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/5030897218416708952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=5030897218416708952' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5030897218416708952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5030897218416708952'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/02/jsf-application-database-access-i.html' title='JSF Application - Database Access - I'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_4-SW9bXomUw/S3NsaZIpkgI/AAAAAAAAAV8/kg_NfrltLNw/s72-c/table+layout.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-811809603961442706</id><published>2010-02-15T13:39:00.010+07:00</published><updated>2010-02-15T17:20:06.430+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Error'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='Web Application'/><category scheme='http://www.blogger.com/atom/ns#' term='Tomcat'/><title type='text'>J2EE - Tomcat Problems - HTTP 500</title><content type='html'>Some times when somethings go wrong, my J2EE application could not be accessed because it did not start. Usually this happens when some libraries was missing, or there are bugs during initialization. I implement a context listener that listen for contextInitialized and contextDestroyed. Since the exception happen during initialization, nothing I can do to catch them.&lt;br /&gt;&lt;br /&gt;Fortunately, Tomcat log the exception in one of its log files. The log files are located at [CATALINA_BASE]\logs. You can find it from Tomcat properties in Services tool box, inside Servers. To find out the real problems, first we have to clear all Tomcat log. Then after stop and start Tomcat, there will be new log files created. Search for Error or Exception. The true error usually contains some thing like "missing" or "syntax error". Some files contains follower errors that are caused by the true error. It usually contains words like "caused by previous errors" or "Application at context path ... could not be started". Skip it.&lt;br /&gt;&lt;br /&gt;Hope this help&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-811809603961442706?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/811809603961442706/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=811809603961442706' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/811809603961442706'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/811809603961442706'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/02/j2ee-tomcat-problems-application-at.html' title='J2EE - Tomcat Problems - HTTP 500'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-226538992200152169</id><published>2010-02-10T13:24:00.045+07:00</published><updated>2010-02-16T18:03:00.129+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans 6.7'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual JSF'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Binding'/><title type='text'>JSF Application - Data Binding: Calculate</title><content type='html'>Useful application retrieve input from user, do some processes, and display the result. JSF provide a binding mechanism from view (*.jsp) page to class (*.java). We will create application to get two input from user, calculate the input some how, then display the result.&lt;br /&gt;&lt;br /&gt;Create a new project, a Visual Web JSF project, and name it DataBinding. Open Page1.jsp, then add 4 Output Text, 4 Text Field and a Button on to the design pane. Arrange it so that it would look like the picture below.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_4-SW9bXomUw/S3JYsBaTO8I/AAAAAAAAAVU/WvpOt1UDGDM/s1600-h/Layout.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 176px;" src="http://4.bp.blogspot.com/_4-SW9bXomUw/S3JYsBaTO8I/AAAAAAAAAVU/WvpOt1UDGDM/s320/Layout.jpg" alt="" id="BLOGGER_PHOTO_ID_5436505213505846210" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can change the title and value from properties tool box. In properties, change calculate button id to "calculate". Set "Read Only" property of Current Result and Last Result to be checked.&lt;br /&gt;&lt;br /&gt;Now, go to the java view.  Right click in editor pane, click Insert Code, click Add Property. See the picture below to add FirstValue variable and then do the same for SecondValue and CurrentResult.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_4-SW9bXomUw/S3i3G-29quI/AAAAAAAAAWE/WgkmQDwg7UQ/s1600-h/Add+Property.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 294px;" src="http://3.bp.blogspot.com/_4-SW9bXomUw/S3i3G-29quI/AAAAAAAAAWE/WgkmQDwg7UQ/s320/Add+Property.jpg" alt="" id="BLOGGER_PHOTO_ID_5438297880630504162" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In project tool box, expand DataBinding project, expand Sources Packages, expand databinding package, open SessionBean1.java (see picture below).&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_4-SW9bXomUw/S3JnW_VfGDI/AAAAAAAAAVs/jhSRIftxyM4/s1600-h/Sources+Packages.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 239px;" src="http://3.bp.blogspot.com/_4-SW9bXomUw/S3JnW_VfGDI/AAAAAAAAAVs/jhSRIftxyM4/s320/Sources+Packages.jpg" alt="" id="BLOGGER_PHOTO_ID_5436521344845944882" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Use Add Property tool to add a property:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;private int LastResult = 0;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Back to Page1.jsp, open design view. Click the First Number text field, then in properties, find value, click elipsis button (...) . In the dialog box, select firstValue object, like the picture below. Do the same thing to Another Number =&gt; secondValue, Current Result =&gt; currentResult, and Last Result to lastResult. Note that last Result is in SessionBean1 object.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_4-SW9bXomUw/S3JloPEg-CI/AAAAAAAAAVk/UoviyYNLSHY/s1600-h/Bind+Value.jpg"&gt;&lt;img style="cursor: pointer; width: 263px; height: 320px;" src="http://1.bp.blogspot.com/_4-SW9bXomUw/S3JloPEg-CI/AAAAAAAAAVk/UoviyYNLSHY/s320/Bind+Value.jpg" alt="" id="BLOGGER_PHOTO_ID_5436519442104252450" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Double click calculate button, NetBeans will open Page1.java and add new method: calculate_action. Add the following code to calculate_action method:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;public String calculate_action() {&lt;br /&gt;CurrentResult = FirstValue * 5 + SecondValue * 9;&lt;br /&gt;getSessionBean1().setLastResult(CurrentResult);&lt;br /&gt;return null;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;find init method and then modify it like below:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;public void init() {&lt;br /&gt;// Perform initializations inherited from our superclass&lt;br /&gt;super.init();&lt;br /&gt;// Perform application initialization that must complete&lt;br /&gt;// *before* managed components are initialized&lt;br /&gt;// TODO - add your own initialiation code here&lt;br /&gt;&lt;br /&gt;Managed Component Initialization&lt;br /&gt;// Perform application initialization that must complete&lt;br /&gt;// *after* managed components are initialized&lt;br /&gt;initPage();&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;then add new method initPage below:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;private void initPage() {&lt;br /&gt;if (isPostBack()){&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;FirstValue = 3;&lt;br /&gt;SecondValue = 8;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;make sure that there are no errors, then run the applications. You should see the following result:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_4-SW9bXomUw/S3Jp_TAaSKI/AAAAAAAAAV0/l85iHBicAOY/s1600-h/Browser+Output.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 234px;" src="http://4.bp.blogspot.com/_4-SW9bXomUw/S3Jp_TAaSKI/AAAAAAAAAV0/l85iHBicAOY/s320/Browser+Output.jpg" alt="" id="BLOGGER_PHOTO_ID_5436524236344281250" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The difference between Current Result and Last Result is that Last Result is member of Session Variable. It will be preserved across request. You can see the difference by modifying the browser address bar by adding "?1" at the end of the address, click enter, and refresh. The Current Result is set to 0 but Last Result remains the same as the last calculation result&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-226538992200152169?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/226538992200152169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=226538992200152169' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/226538992200152169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/226538992200152169'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/02/jsf-application-data-binding-calculate.html' title='JSF Application - Data Binding: Calculate'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_4-SW9bXomUw/S3JYsBaTO8I/AAAAAAAAAVU/WvpOt1UDGDM/s72-c/Layout.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-6551273720802956949</id><published>2010-02-10T11:52:00.020+07:00</published><updated>2010-02-16T18:03:28.365+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans 6.7'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual JSF'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Binding'/><title type='text'>JSF Application - Basic: A Hello World</title><content type='html'>This post will show you how to create a HelloWorld application using Visual JSF that are included in NetBeans 5.0 to NetBeans 6.7. Unfortunately NetBeans 6.8 that are support JSf 2.0 remove Visual JSF. I use NetBeans 6.7.1 + Tomcat to create the application.&lt;br /&gt;&lt;br /&gt;First we must install JDK 1.6, then install NetBeans 6.7. Select custom installation. NetBeans offer to install Glass Fish instead of Tomcat. Remove Glass Fish and select Tomcat in installation options. After installation complete, run the NetBeans.&lt;br /&gt;&lt;br /&gt;In the project toolbar, right clik select New Project. Select Java Web in categories and Web Application in Project box, then click next. Enter project name, check "Use Dedicated folder..." options, click next, and click next again. Check Visual Web JavaServer Faces and JavaServer Faces. Click Finish.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_4-SW9bXomUw/S3JO2ESuKOI/AAAAAAAAAUk/ySGvK7Tkvk0/s1600-h/New+JSF+Project.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 221px;" src="http://3.bp.blogspot.com/_4-SW9bXomUw/S3JO2ESuKOI/AAAAAAAAAUk/ySGvK7Tkvk0/s320/New+JSF+Project.jpg" alt="" id="BLOGGER_PHOTO_ID_5436494390961776866" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_4-SW9bXomUw/S3JO7Q9XOwI/AAAAAAAAAUs/cV9do_YDtj4/s1600-h/New+JSF+Project+-+Name+and+Location.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 221px;" src="http://1.bp.blogspot.com/_4-SW9bXomUw/S3JO7Q9XOwI/AAAAAAAAAUs/cV9do_YDtj4/s320/New+JSF+Project+-+Name+and+Location.jpg" alt="" id="BLOGGER_PHOTO_ID_5436494480261200642" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_4-SW9bXomUw/S3JO_JB1AMI/AAAAAAAAAU0/cXbG1FMdNVc/s1600-h/New+JSF+Project+-+Frameworks.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 221px;" src="http://2.bp.blogspot.com/_4-SW9bXomUw/S3JO_JB1AMI/AAAAAAAAAU0/cXbG1FMdNVc/s320/New+JSF+Project+-+Frameworks.jpg" alt="" id="BLOGGER_PHOTO_ID_5436494546851922114" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Click Run or Debug main project toolbar to run the application. After compiling application, NetBeans will start your browser and display default blank page. Back to NetBeans, expand Web Pages dir in Project Toolbox. Double click Page1.jsp to open it. In the design view, open Palette, drag Output Text from Standard Category to design pane. Edit its text to be Hello JSF. Save all changes and refresh the browser. You should see Hello JSF text in the page now.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_4-SW9bXomUw/S3JPJZKsdaI/AAAAAAAAAU8/cOXVrkI5DfM/s1600-h/Project+Files.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 239px;" src="http://2.bp.blogspot.com/_4-SW9bXomUw/S3JPJZKsdaI/AAAAAAAAAU8/cOXVrkI5DfM/s320/Project+Files.jpg" alt="" id="BLOGGER_PHOTO_ID_5436494722982770082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_4-SW9bXomUw/S3JPT_wGVNI/AAAAAAAAAVM/77r4jWsme1I/s1600-h/Browser+Output.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 234px;" src="http://2.bp.blogspot.com/_4-SW9bXomUw/S3JPT_wGVNI/AAAAAAAAAVM/77r4jWsme1I/s320/Browser+Output.jpg" alt="" id="BLOGGER_PHOTO_ID_5436494905138894034" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To stop application, open Services toolbox, expand Servers, expand Tomcat, Expand Web Applications. Right click your project, click undeploy. Right click tomcat click stop. Close the browser. Closing only the browser does not stop your application.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_4-SW9bXomUw/S3JPRBpHPWI/AAAAAAAAAVE/nLwpLysczN0/s1600-h/Running+Project.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 239px;" src="http://4.bp.blogspot.com/_4-SW9bXomUw/S3JPRBpHPWI/AAAAAAAAAVE/nLwpLysczN0/s320/Running+Project.jpg" alt="" id="BLOGGER_PHOTO_ID_5436494854106856802" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-6551273720802956949?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/6551273720802956949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=6551273720802956949' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/6551273720802956949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/6551273720802956949'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/02/jsf-basic-application-hello-world.html' title='JSF Application - Basic: A Hello World'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_4-SW9bXomUw/S3JO2ESuKOI/AAAAAAAAAUk/ySGvK7Tkvk0/s72-c/New+JSF+Project.jpg' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-1826083910669068454</id><published>2010-02-10T10:29:00.005+07:00</published><updated>2010-02-10T10:54:22.218+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jc211'/><category scheme='http://www.blogger.com/atom/ns#' term='Java Card'/><title type='text'>Develop Java Card Application - IV</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;NetBeans 6.8 - Compile Java Card&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Lets try to compile the project.&lt;br /&gt;-- Open command prompt&lt;br /&gt;-- go to src directory that are created inside project folder. src should contains package directories and our class file: Scapplet.java&lt;br /&gt;-- Set required environment variable&lt;br /&gt;-- execute: javac -g -target 1.1 -source 1.2 com\mycorp\Scapplet\Scapplet.java&lt;br /&gt;-- execute: converter -config com\mycorp\Scapplet\Scapplet.opt&lt;br /&gt;&lt;br /&gt;You should see Scapplet.cap in new directory com\mycorp\Scapplet\javacard.&lt;br /&gt;to install execute GPShell and pass Scapplet.install as its parameters. If you have problems of something not found, try to replace variable (%..%) with the absolute path.&lt;br /&gt;&lt;br /&gt;The application does not contains anything and will ignore any APDU command and always return 9000 (OK). You can try to install wallet or purse application that are included in jc211 samples. Try to send APDU to that app and see what is its response.&lt;br /&gt;&lt;br /&gt;Good luck&lt;br /&gt;&lt;br /&gt;&lt;a href="http://nevaku.blogspot.com/2010/02/develop-java-card-application-iii.html"&gt;back&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-1826083910669068454?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/1826083910669068454/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=1826083910669068454' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1826083910669068454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1826083910669068454'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/02/develop-java-card-application-iv.html' title='Develop Java Card Application - IV'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-5468759895806152302</id><published>2010-02-09T17:04:00.014+07:00</published><updated>2010-02-10T10:53:59.118+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jc211'/><category scheme='http://www.blogger.com/atom/ns#' term='Java Card'/><title type='text'>Develop Java Card Application - III</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;span style="font-weight: bold;"&gt;NetBeans 6.8 - Create Java Card Project&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Now lets start create our own application. Start NetBeans 6.8 and open new project wizard. Select Java Card in project category, then select Classic Applet Project. Follow any instructions to complete the wizard. NetBeans will automatically open default class. Its better to rename the package and the class to be something like this:&lt;br /&gt;&gt;&gt; package name: com.mycorp.Scapplet&lt;br /&gt;&gt;&gt; class name: Scapplet.java&lt;br /&gt;Package name need to be sama as class name, so that the converter will create Scapplet4.cap.&lt;br /&gt;&lt;br /&gt;In addition we also have to manually create configuration file for converter and installation script for GPShell. Create Scapplet.opt and Scapplet.install.&lt;br /&gt;Scapplet.opt contents are:&lt;br /&gt;(remove the line numbers. line without number, is the same line as its above)&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;(1)-out EXP JCA CAP&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(2)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;-exportpath %JC21%\api21&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(3)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;-applet  0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x5:0x1 com.mycorp.Scapplet.Scapplet&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(4)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;com.mycorp.Scapplet&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(5)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x5 1.0&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Scapplet.install contents are:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(1)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;mode_201&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(2)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;gemXpressoPro&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(3)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;enable_trace&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(4)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;establish_context&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(5)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;card_connect&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(6)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;select -AID A000000018434D00&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(7)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;open_sc -security 0 -keyind 0 -keyver 0 -key &lt;/span&gt;&lt;span style="font-family:courier new;"&gt;47454d5850524553534f53414d504c45 // Open secure channel&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(8)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;delete -AID a00000006203010c0501&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(9)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;delete -AID a00000006203010c05&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(10)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;delete -AID a00000006203010c0501&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(11)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;install -file com\mycorp\Scapplet\Scapplet.cap -sdAID A000000018434D00 -nvCodeLimit 40000&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(12)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;card_disconnect&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;(13)&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;release_context&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://nevaku.blogspot.com/2010/02/develop-java-card-application-ii.html"&gt;back&lt;/a&gt; &lt;a href="http://nevaku.blogspot.com/2010/02/develop-java-card-application-iv.html"&gt;next&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-5468759895806152302?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/5468759895806152302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=5468759895806152302' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5468759895806152302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5468759895806152302'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/02/develop-java-card-application-iii.html' title='Develop Java Card Application - III'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-7067131760590629889</id><published>2010-02-09T16:16:00.011+07:00</published><updated>2010-02-10T10:53:09.053+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jc211'/><category scheme='http://www.blogger.com/atom/ns#' term='Java Card'/><title type='text'>Develop Java Card Application - II</title><content type='html'>&lt;span style="font-weight: bold;font-size:130%;" &gt;Java Card kit 2.1.1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The jc211 directory contains several sub dir: api21, bin, demo, doc, lib, and samples. We must read JavaCardKitUserGuide.pdf and follow its step by step installation instruction. The following is step for Windows environment that must be executed from command prompt:&lt;br /&gt;-- set JC21BIN=bin&lt;br /&gt;bin is sub directory of jc211. You better enter the full path such as: set JC21BIN=C:\jc211\bin&lt;br /&gt;-- set PATH=%PATH%;%JC21BIN%;%JDK_HOME%\bin;%GPShell_HOME%&lt;br /&gt;replace %JDK_HOME% with your Java JDK directory that contains \bin\javac.exe file. We can use JDK 1.2 to 1.6&lt;br /&gt;replace %GPShell_HOME% with the directory that contains GPShell.exe&lt;br /&gt;-- set CLASSPATH="%JRE_HOME%\lib\rt.jar";%JC21BIN%\api21.jar&lt;br /&gt;replace JRE_HOME with your Java run time directory that contains \lib\rt.jar. Note that I put quote for JRE class path, but no quote for api21.jar. Some how javac.exe can not resolve the class path if I put quotes, but the converter.bat (from jc211) can not resolved the class path if there are spaces in directory name, and no quotes in class path.&lt;br /&gt;&lt;br /&gt;After all parameters are set, change command prompt directory to jc211\samples. We will test the kit by compile and convert HelloWorld.java to HelloWorld.cap. Execute the following from command prompt:&lt;br /&gt;-- javac -g -target 1.1 -source 1.2 com\sun\javacard\samples\HelloWorld\HelloWorld.java&lt;br /&gt;It will compile HelloWorld.java. You should see HelloWorld.class after successful compilation. -target 1.1 and -source 1.2 is needed to make HelloWorld.class to be compatible with jc211. Option -g is requiired by converter to create HelloWorld.cap&lt;br /&gt;-- converter -config com\sun\javacard\samples\HelloWorld\HelloWorld.opt&lt;br /&gt;It will create \javacard\helloworld.cap and other files.&lt;br /&gt;&lt;br /&gt;install HelloWorld.cap by modify helloDeletegemXpressoProR3_2E64.txt scripts, and copy to this new HelloWorld.cap container directory.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://nevaku.blogspot.com/2010/02/develop-java-card-application-i.html"&gt;back&lt;/a&gt; &lt;a href="http://nevaku.blogspot.com/2010/02/develop-java-card-application-iii.html"&gt;next&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-7067131760590629889?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/7067131760590629889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=7067131760590629889' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/7067131760590629889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/7067131760590629889'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/02/develop-java-card-application-ii.html' title='Develop Java Card Application - II'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-3346785950266635152</id><published>2010-02-09T14:17:00.018+07:00</published><updated>2010-03-12T10:21:14.889+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='jc211'/><category scheme='http://www.blogger.com/atom/ns#' term='Java Card'/><title type='text'>Develop Java Card Application - I</title><content type='html'>To develop java card application I use following tools&lt;br /&gt;-- Net Beans 6.8&lt;br /&gt;-- Java Card plug-in for Net Beans to help develop source code.&lt;br /&gt;-- Gemalto PC Twin Smart Card Reader and Writer + Drivers&lt;br /&gt;-- Gemalto sample Smart Card - MultiAppID Java Card 72K&lt;br /&gt;-- GPShell-1.4.2 to install and test the card&lt;br /&gt;-- java_card_kit-2_1_1-win&lt;br /&gt;-- OS: Windows XP&lt;br /&gt;&lt;br /&gt;Java card plug-in is available in NetBeans plug-in manager. The plug-in is support java card 1.3 or above. However we can still use it to develop previous java card version. My card is Java Card 2.2.1 Virtual Machines.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 130%;"&gt;&lt;span style="font-weight: bold;"&gt;GPShell-1.4.2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;First make sure that reader and card work as expected. GPShell-1.4.2 comes with some sample scripts. For Gemalto card, our first script will be helloInstallgemXpressoProR3_2E64.txt. All we have to do is execute the following syntax:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;GPShell helloInstallgemXpressoProR3_2E64.txt&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You should see APDU commands and reply. If every thing is OK, APDU reply trailer is 9000. If there is an error, see the error code and googling for the solutions. If you have error like failed authentication, double check your key and make sure you use Gemalto Sample card.&lt;br /&gt;&lt;br /&gt;If everything is OK, you may test others scripts: helloDeletegemXpressoProR3_2E64.txt, purseInstallgemXpressoProR3_2E64.txt, and walletInstallgemXpressoProR3_2E64.txt. GPShell has a README file that describe all available parameters. Running GPShell without parameters will enter its command prompt. Later type GPSheel command to communicate with the card.&lt;br /&gt;&lt;br /&gt;Lets open the helloInstallgemXpressoProR3_2E64.txt script file. It contains several lines of command. The first important command is establish_context. It initiate communication to smart card reader and get available readers. Then card_connect will connect GPSheel with the smart card. The next step will select a Java Card application installed in smart card: select -AID A000000018434D00. GPShell will translate this command to APDU: 00A4040008A000000018434D00. This command is to select Gemalto application that handle application installation.&lt;br /&gt;&lt;br /&gt;To install and delete application, the card required a secure channel. Meaning that card must trust the host and vice versa. That is why the next command is&lt;br /&gt;&lt;br /&gt;open_sc -security 0 -keyind 0 -keyver 0 -key 47454d5850524553534f53414d504c45&lt;br /&gt;&lt;br /&gt;GPShell will send several APDU and card send several SPDU replies to establish secure channel.&lt;br /&gt;After secure channel established, application is installed by this command:&lt;br /&gt;&lt;br /&gt;install -file HelloWorld.cap -sdAID A000000018434D00 -nvCodeLimit 4000&lt;br /&gt;&lt;br /&gt;GPShell send several APDU and then send HelloWorld.cap bytes to the card. The last two command is to disconnect the card and release resources.&lt;br /&gt;&lt;br /&gt;The HelloWorld application does nothing important. It just reply the APDU as it send by the host. You can try it by using send APDU command inside GPShell shell. type GPShell then press enter, then execute the following command by type it then press enter&lt;br /&gt;1) establish_context&lt;br /&gt;2) card_connect&lt;br /&gt;3) select -AID a00000006203010c0101&lt;br /&gt;Use this to select (activate) HelloWorld application&lt;br /&gt;4) send_apdu -sc 0 -APDU 80010000023132&lt;br /&gt;Testing hello world function. The card will reply the same APDU as it send. You can change it with any valid APDU.&lt;br /&gt;5) card_disconnect&lt;br /&gt;6) release_context&lt;br /&gt;&lt;br /&gt;&lt;a href="http://nevaku.blogspot.com/2010/02/develop-java-card-application-ii.html"&gt;next&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-3346785950266635152?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/3346785950266635152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=3346785950266635152' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/3346785950266635152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/3346785950266635152'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/02/develop-java-card-application-i.html' title='Develop Java Card Application - I'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-7637734655268994181</id><published>2010-02-09T10:35:00.021+07:00</published><updated>2010-02-09T13:12:43.435+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Smart Card'/><category scheme='http://www.blogger.com/atom/ns#' term='Java Card'/><category scheme='http://www.blogger.com/atom/ns#' term='EMV Card'/><title type='text'>Why does make a Smart Card to be smart?</title><content type='html'>Most of us already familiar with financial cards. The cards that we use to take money from ATM or teller, to pay bill when we buy something, and also to operate our cell phone. These cards main function is to let card issued to identify card user. Some cards also has additional data such as balance or points.&lt;br /&gt;&lt;br /&gt;In the old way, those data are stored into magnetic stripe. It easy to read and write. We can also easily buy it. Unfortunately, because of this easiness, bad guys that have access to the card can also easily duplicate it. So the industry add PIN as additional factor to verify the card. Unfortunately, it can still be duplicated by unauthorized people. In many cases, bad guys can get the user PIN using social engineering, hidden camera and other techniques.&lt;br /&gt;&lt;br /&gt;Finally the smart card comes to our world. Instead of using magnetic stripe, it contains chip that act like micro computer. It has CPU, persistent memory, and interfaces. It has an operating system and we can install applications to smart card. When we interact to smart card, we actually sending instruction and data to them. Smart card application that receive it decides how to process the instruction and where to store the data. That is why it is "Smart".&lt;br /&gt;&lt;br /&gt;Card Issuer injects Card ID, PIN, and encryption algorithm to the smart card. Terminal devices that access the card have to be granted by the card. The smart card authentication process can be seen in the following picture:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_4-SW9bXomUw/S3DoFPuwiUI/AAAAAAAAAUU/LmIyS_mhhnw/s1600-h/Authentication.jpg"&gt;&lt;img style="cursor: pointer; width: 314px; height: 320px;" src="http://3.bp.blogspot.com/_4-SW9bXomUw/S3DoFPuwiUI/AAAAAAAAAUU/LmIyS_mhhnw/s320/Authentication.jpg" alt="" id="BLOGGER_PHOTO_ID_5436099927055829314" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;The actual process is more complicated. However the picture give the overview. At the end of the process, smart card compare check-sum from terminal and from its calculation. If both are match than device is authenticated by the card. Authenticated terminal can send further instruction and data.&lt;br /&gt;&lt;br /&gt;In the authentication process there are keys that are used to calculate check-sum. In symmetric encryption algorithm, such as DES or 3DES, both keys are the same. In asymmetric encryption algorithm, such as RSA or AES, keys can be different. One is public key, another is private key.&lt;br /&gt;&lt;br /&gt;These keys and encryption, make it hard to be duplicated. First we have to know how to communicate with the card and its can be proprietary. Then we must know the keys and algorithm to generate check-sum. Card issuer can also encrypt data inside the card. Thus if some one can read it, he/she don't know what it is.&lt;br /&gt;&lt;br /&gt;There are several terms of smart card. The famous terms in smart card are Java Card, NET Card, and EMV Card. Java card is smart card that already have java runtime engine (JVM) installer. NET Card is smart card with .NET runtime installed. EMV is a standard of smart card interface for financial purpose. EMV is proposed by Euro, Master Card and Visa. Smart card that implement EMV standard can be widely used for financial transaction around the world.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-7637734655268994181?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/7637734655268994181/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=7637734655268994181' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/7637734655268994181'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/7637734655268994181'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/02/why-does-make-smart-card-to-be-smart.html' title='Why does make a Smart Card to be smart?'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_4-SW9bXomUw/S3DoFPuwiUI/AAAAAAAAAUU/LmIyS_mhhnw/s72-c/Authentication.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-3561742562584789795</id><published>2010-02-09T10:26:00.015+07:00</published><updated>2010-02-16T18:11:29.130+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PCSC'/><category scheme='http://www.blogger.com/atom/ns#' term='Gemalto'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='ActiveX'/><category scheme='http://www.blogger.com/atom/ns#' term='Smart Card'/><category scheme='http://www.blogger.com/atom/ns#' term='Java Card'/><category scheme='http://www.blogger.com/atom/ns#' term='APDU'/><title type='text'>Web Application Using ActiveX Java Card</title><content type='html'>I have a task to develop demo application that utilize Java Card - Smart Card Application. The whole application was a web based java application. At some point the application must write and later it must read from a java card. These are my development environment:&lt;br /&gt;-- J2EE + JSF + Net Beans 6.8 + Tomcat 6.0.20&lt;br /&gt;-- Java Card plug-in for Net Beans to help develop source code.&lt;br /&gt;-- MySql Database (replaceable by others db)&lt;br /&gt;-- Gemalto PC Twin Smart Card Reader and Writer + Drivers&lt;br /&gt;-- Gemalto sample Smart Card - Java Card 72K&lt;br /&gt;-- Visual Studio 6 to create ActiveX&lt;br /&gt;-- OS: Windows XP&lt;br /&gt;&lt;br /&gt;Here is the system overview diagram&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_4-SW9bXomUw/S3EGy0VE38I/AAAAAAAAAUc/rvtLFN2j804/s1600-h/SC+System+Overview.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 225px;" src="http://3.bp.blogspot.com/_4-SW9bXomUw/S3EGy0VE38I/AAAAAAAAAUc/rvtLFN2j804/s320/SC+System+Overview.jpg" alt="" id="BLOGGER_PHOTO_ID_5436133695323168706" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;1) Browser request for card access page. Server reply with the page&lt;br /&gt;2) Browser initiate ActiveX to start smart card communication&lt;br /&gt;3) ActiveX request APDU command to be sent to smart card&lt;br /&gt;4) Web server construct the APDU based on data in database and previous states&lt;br /&gt;5) Web server reply the APDU to ActiveX&lt;br /&gt;6) ActiveX send APDU to smart card through a reader&lt;br /&gt;7) Smart card send APDU reply to ActiveX&lt;br /&gt;the step is repeat to (3), (4), (5), (6) and (7) again&lt;br /&gt;until either error or browser send no APDU to ActiveX.&lt;br /&gt;&lt;br /&gt;The web server do most of the business logic task. The browser display page requested from web server. ActiveX acts as a bridge between web server and smart card.&lt;br /&gt;&lt;br /&gt;There are three applications need to be developed:&lt;br /&gt;1. J2EE applications to provide user interface for application&lt;br /&gt;2. Java Card applications to be installed to smart card&lt;br /&gt;3. ActiveX to bridge communication between Web Server and Smart Card.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-3561742562584789795?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/3561742562584789795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=3561742562584789795' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/3561742562584789795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/3561742562584789795'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/02/web-application-using-activex-java-card.html' title='Web Application Using ActiveX Java Card'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_4-SW9bXomUw/S3EGy0VE38I/AAAAAAAAAUc/rvtLFN2j804/s72-c/SC+System+Overview.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-3276316513555139685</id><published>2010-01-29T13:00:00.004+07:00</published><updated>2010-03-17T13:55:08.032+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Array'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Byte'/><category scheme='http://www.blogger.com/atom/ns#' term='String'/><title type='text'>new String(byte[]) and String.getBytes()</title><content type='html'>We can convert String into array of bytes (byte[]) and vice-versa easily.&lt;br /&gt;&lt;br /&gt;To get array of byte from string:&lt;br /&gt;&lt;br /&gt;byte[] bs = "hello".getBytes();&lt;br /&gt;&lt;br /&gt;To get String from array of bytes:&lt;br /&gt;&lt;br /&gt;String str = new String(new byte[]{31,44,33,45,45});&lt;br /&gt;&lt;br /&gt;However things getting worst when it involves non printable chars like null char, ^BS (back space), and ^TAB. Conversion will not convert it back to its original value. See the example:&lt;br /&gt;&lt;br /&gt;byte[] bs = new byte[]{0,1,2,3,4};&lt;br /&gt;String str = new String(bs);&lt;br /&gt;byte[] bs1 = str.getBytes();&lt;br /&gt;&lt;br /&gt;bs1 is not equal to bs. It contains \u... char after conversion. It may also have different result between Linux and Windows and may change from time to time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-3276316513555139685?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/3276316513555139685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=3276316513555139685' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/3276316513555139685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/3276316513555139685'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/01/new-stringbyte-and-stringgetbytes.html' title='new String(byte[]) and String.getBytes()'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-6769882032335738499</id><published>2010-01-29T12:58:00.002+07:00</published><updated>2010-01-29T12:59:39.553+07:00</updated><title type='text'>Oracle - Sun - Java</title><content type='html'>See &lt;a href="http://www.oracle.com/technology/community/sun-oracle-community-continuity.html"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-6769882032335738499?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/6769882032335738499/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=6769882032335738499' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/6769882032335738499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/6769882032335738499'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/01/oracle-sun-java.html' title='Oracle - Sun - Java'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-1855255631326436857</id><published>2010-01-21T10:22:00.011+07:00</published><updated>2010-02-16T18:04:59.138+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET Framework 1.1'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows 7'/><title type='text'>Setting .NET FX 1.1 in Windows 7</title><content type='html'>I search in internet and did not find a good clue. So I try to do it my self. Previously I already set it up in Vista, including the VS 2003 too. I don't want to upgrade my project yet. It required plenty of tasks.&lt;br /&gt;&lt;br /&gt;Here is how I did it:&lt;br /&gt;-- Install Windows 7 Ultimate. I Install it in VHD. See my previous post &lt;a href="http://nevaku.blogspot.com/2010/01/install-windows-7-on-virtual-disk.html"&gt;here&lt;/a&gt;.&lt;br /&gt;-- Install IIS like the following image, then restart&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_4-SW9bXomUw/S1fJh4XCf5I/AAAAAAAAATk/j7-4chaf_eQ/s1600-h/1.+Win7+IIS+Components.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; cursor: pointer; width: 130px; height: 320px;" src="http://3.bp.blogspot.com/_4-SW9bXomUw/S1fJh4XCf5I/AAAAAAAAATk/j7-4chaf_eQ/s320/1.+Win7+IIS+Components.JPG" alt="" id="BLOGGER_PHOTO_ID_5429029459720306578" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;-- Install .NET FX 1.1, then restart&lt;br /&gt;-- Install .NET FX 1.1 Sp 1, then restart&lt;br /&gt;-- Configure IIS, see the following images, then restart&lt;br /&gt;&lt;br /&gt;Root ISAPI and CGI Restriction&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_4-SW9bXomUw/S1fKeeOLiuI/AAAAAAAAATs/sPp_umax6GY/s1600-h/2.1.+ISAPI+and+CGI+Restrictions.JPG"&gt;&lt;img style="cursor: pointer; width: 320px; height: 136px;" src="http://2.bp.blogspot.com/_4-SW9bXomUw/S1fKeeOLiuI/AAAAAAAAATs/sPp_umax6GY/s320/2.1.+ISAPI+and+CGI+Restrictions.JPG" alt="" id="BLOGGER_PHOTO_ID_5429030500675848930" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Application Pool ASP.NET 1.1 Advance Setting&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_4-SW9bXomUw/S1fKtG40o4I/AAAAAAAAAT0/6mqh84ii18c/s1600-h/2.2.+ASP.NET+App+Pool+Adv.+Setting.jpg"&gt;&lt;img style="cursor: pointer; width: 265px; height: 320px;" src="http://2.bp.blogspot.com/_4-SW9bXomUw/S1fKtG40o4I/AAAAAAAAAT0/6mqh84ii18c/s320/2.2.+ASP.NET+App+Pool+Adv.+Setting.jpg" alt="" id="BLOGGER_PHOTO_ID_5429030752110289794" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Default Web Site Advance Setting&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_4-SW9bXomUw/S1fK5rpwzeI/AAAAAAAAAT8/sZQDQZEgjxk/s1600-h/2.3.+Def.+WS+Adv.+Setting.JPG"&gt;&lt;img style="cursor: pointer; width: 261px; height: 320px;" src="http://4.bp.blogspot.com/_4-SW9bXomUw/S1fK5rpwzeI/AAAAAAAAAT8/sZQDQZEgjxk/s320/2.3.+Def.+WS+Adv.+Setting.JPG" alt="" id="BLOGGER_PHOTO_ID_5429030968137666018" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Default Web Site ISAPI Filters&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_4-SW9bXomUw/S1fLE5gSj7I/AAAAAAAAAUE/O0gt7OmDahE/s1600-h/2.4.+Def.+WS+ISAP+Filters.JPG"&gt;&lt;img style="cursor: pointer; width: 320px; height: 249px;" src="http://3.bp.blogspot.com/_4-SW9bXomUw/S1fLE5gSj7I/AAAAAAAAAUE/O0gt7OmDahE/s320/2.4.+Def.+WS+ISAP+Filters.JPG" alt="" id="BLOGGER_PHOTO_ID_5429031160834592690" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Default Web Site Authentication&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_4-SW9bXomUw/S1fLjVApanI/AAAAAAAAAUM/JB35tdDVrUA/s1600-h/2.5.+Def.+WS+Authentication.JPG"&gt;&lt;img style="cursor: pointer; width: 320px; height: 112px;" src="http://4.bp.blogspot.com/_4-SW9bXomUw/S1fLjVApanI/AAAAAAAAAUM/JB35tdDVrUA/s320/2.5.+Def.+WS+Authentication.JPG" alt="" id="BLOGGER_PHOTO_ID_5429031683614141042" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;-- Install your .NET 1.1 Application&lt;br /&gt;&lt;br /&gt;Thats all. Good luck&lt;br /&gt;&lt;br /&gt;Harun&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-1855255631326436857?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/1855255631326436857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=1855255631326436857' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1855255631326436857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1855255631326436857'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/01/setting-net-fx-11-in-windows-7.html' title='Setting .NET FX 1.1 in Windows 7'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_4-SW9bXomUw/S1fJh4XCf5I/AAAAAAAAATk/j7-4chaf_eQ/s72-c/1.+Win7+IIS+Components.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-7984796630732832751</id><published>2010-01-19T12:01:00.004+07:00</published><updated>2010-02-16T18:08:38.110+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Install'/><category scheme='http://www.blogger.com/atom/ns#' term='Virtual Disk'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows 7'/><title type='text'>Install Windows 7 On Virtual Disk</title><content type='html'>The original article was&lt;br /&gt;"&lt;a href="http://www.hanselman.com/blog/LessVirtualMoreMachineWindows7AndTheMagicOfBootToVHD.aspx"&gt;http://www.hanselman.com/blog/LessVirtualMoreMachineWindows7AndTheMagicOfBootToVHD.aspx&lt;/a&gt;"&lt;br /&gt;&lt;br /&gt;This article is ideal for the following situation&lt;br /&gt;-- You want to test or develop some thing on Windows 7&lt;br /&gt;-- Your PC does not have spare partition for new OS. Drive C for current OS, Drive D for multipurpose.&lt;br /&gt;-- Virtual machine is not an option because it too slow&lt;br /&gt;-- You still have plenty of disk spaces on Drive C or D&lt;br /&gt;-- You have Windows 7 Ultimate or Enterprise Installation Disk&lt;br /&gt;&lt;br /&gt;Solution;&lt;br /&gt;-- Boot using Windows 7 installation disk&lt;br /&gt;-- Create a virtual disk by following step in the article above&lt;br /&gt;-- Do not restart after installation complete. If you do so, run diskpart again to attach virtual disk.&lt;br /&gt;-- Click setup in command prompt after virtual disk is created and attached&lt;br /&gt;-- Follow the installation, and make sure you choose Virtual Disk as destination partition. Ignore warning that says "... no driver for the disk ..."&lt;br /&gt;-- Do the rest of installation&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-7984796630732832751?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/7984796630732832751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=7984796630732832751' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/7984796630732832751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/7984796630732832751'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/01/install-windows-7-on-virtual-disk.html' title='Install Windows 7 On Virtual Disk'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-5772605814790330426</id><published>2010-01-19T11:57:00.002+07:00</published><updated>2010-02-16T18:09:00.855+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IIS'/><category scheme='http://www.blogger.com/atom/ns#' term='Limit'/><category scheme='http://www.blogger.com/atom/ns#' term='Connection'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows XP'/><title type='text'>In Windows XP, IIS Connection Limit is 40 not 10</title><content type='html'>Yes it actually 40 no 10. The default value is 10. Windows XP does not provide a GUI to edit to 40 but you can. Do:&lt;br /&gt;C:\Inetpub\AdminScripts\adsutil set w3svc/MaxConnections 40&lt;br /&gt;&lt;br /&gt;see:&lt;br /&gt;http://www.codinghorror.com/blog/archives/000329.html&lt;br /&gt;or&lt;br /&gt;http://www.tomshardware.com/forum/4956-45-connection-limit&lt;br /&gt;&lt;br /&gt;for detail article&lt;br /&gt;&lt;br /&gt;Harun&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-5772605814790330426?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/5772605814790330426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=5772605814790330426' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5772605814790330426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5772605814790330426'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/01/in-windows-xp-iis-connection-limit-is.html' title='In Windows XP, IIS Connection Limit is 40 not 10'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-5624905142376449241</id><published>2010-01-15T11:21:00.006+07:00</published><updated>2010-01-15T13:16:40.137+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java Integer Exception'/><title type='text'>In Java, Automatic Convertion from Integer to int Cause NullPointer Exception</title><content type='html'>Automatic conversion from Integer to int does not always successful. If the Integer variable contains null value, then conversion will raise a NullPointer exception. It happen to my application that was works fine before. I hardly find this, because this involving HashMap and function return value.&lt;br /&gt;&lt;br /&gt;Here is my case. I declare a function that will return int. Inside the function, there is a line like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;HashMap&amp;lt;String,Integer&amp;gt; list;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;return list.get(key);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;everything will be OK, except when the list return null. Null can not be converted to any int value. It will raise NullPointer exception. I have to manually add exception handler and return 0 it the list return null.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-5624905142376449241?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/5624905142376449241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=5624905142376449241' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5624905142376449241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5624905142376449241'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/01/automatic-convertion-from-integer-to.html' title='In Java, Automatic Convertion from Integer to int Cause NullPointer Exception'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-8127054485970279319</id><published>2010-01-13T10:50:00.004+07:00</published><updated>2010-02-16T18:07:04.705+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Project Group'/><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>Copy NetBeans Project Group</title><content type='html'>I create several user dirs for Net Beans IDE. Each have their own setting. There is a time when I need to copy only project group setting from one user dir to anothers. I try to googling but its results was not some thing I want. Then I do it my self. I use source control facility to monitor folder changes when I add/modify project group. I found that all project group setting is saved in "userdir\config\Preferences\org\netbeans\modules\projectui*". "userdir" is based user directory.&lt;br /&gt;To copy project group setting, copy all files and folders that start with "projectui".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-8127054485970279319?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/8127054485970279319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=8127054485970279319' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/8127054485970279319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/8127054485970279319'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/01/copy-netbeans-project-group.html' title='Copy NetBeans Project Group'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-4677402349613696296</id><published>2010-01-12T14:03:00.004+07:00</published><updated>2010-02-16T18:07:26.130+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Start'/><category scheme='http://www.blogger.com/atom/ns#' term='Problems'/><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>NetBean 6.7.1 Unable to Start</title><content type='html'>I use NetBeans 6.7.1 to develop J2EE application. Suddenly it can not start. It shows progress bar, then the progress disappear, but NetBeans doesnot show anything. Fortunatelly, I have several NetBean user base directory. When I start NetBeans using other base directory ("netbeans.exe"  --userdir "\Projects\NetBeans\nb6.7 #1")  it start normally. So there are some thing wrong inside the base dir data.&lt;br /&gt;&lt;br /&gt;After digging out, try to delete and restore some files, finally I figure it out that every thing back to normal when I delete WindowManager.wswmgr file and Components directory that are located in [basedir]\config\Windows2Local\.&lt;br /&gt;&lt;br /&gt;I still don't know is that anything wrong with that.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-4677402349613696296?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/4677402349613696296/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=4677402349613696296' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/4677402349613696296'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/4677402349613696296'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2010/01/netbean-671-unable-to-started.html' title='NetBean 6.7.1 Unable to Start'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-2430088872793388880</id><published>2009-12-30T15:13:00.004+07:00</published><updated>2010-02-16T18:07:50.977+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MySql'/><category scheme='http://www.blogger.com/atom/ns#' term='Multiple Server'/><title type='text'>MySQL - Multiple Server Instance in Windows</title><content type='html'>My application is hard coded to always use "appdb" database. Unfortunatelly some time I need another set of database for testing or other RND processes. Thus, I have to create another instance of database server that listen on different port, e.g. 3307 instead of default MySQL port 3306. Using MySQL administrator, I can create this easily.&lt;br /&gt;&lt;br /&gt;First I must Install MySQL gui tools. Then start MySQL System Tray Monitor. In tray Icon, right click MySQL tray icon, then click "Configure Instance" menu. It will open MySQL Administrator but in a different mode. In Service Control, click Configure Service tab. At the bottom of the panel, there is Install New Service button. Before clicking this button, we have to prepare my.ini and directory for data . This is simple copy paste my.ini from MySQL base directory, also copy data directory to somewhere else.&lt;br /&gt;&lt;br /&gt;Now, click Install New Service button. Enter new service name, klik OK. Modify Config Filename to point to the new my.ini file. Enter a valid path to binary by copy paste from default service. Then click Apply Changes button.&lt;br /&gt;&lt;br /&gt;Move to Startup Variables. Change TCP Port to new port e.g. 3307. Modify Data Directory to the new data directory. Done.&lt;br /&gt;&lt;br /&gt;Back to Service Control. Click Start/Stop Service tab, then click Start Service. It should starting and done.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-2430088872793388880?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/2430088872793388880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=2430088872793388880' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/2430088872793388880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/2430088872793388880'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2009/12/mysql-multiple-server-instance-in.html' title='MySQL - Multiple Server Instance in Windows'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-1640814968454845623</id><published>2009-12-29T17:45:00.010+07:00</published><updated>2011-06-15T16:38:59.206+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='warn'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='log4j'/><category scheme='http://www.blogger.com/atom/ns#' term='log4j:configuration'/><title type='text'>log4j:WARN The content of element type "log4j:configuration" must match ....</title><content type='html'>The complete error message is&lt;br /&gt;log4j:WARN The content of element type "log4j:configuration" must match "(renderer*,appender*,plugin*,(category|logger)*,root?,(categoryFactory|loggerFactory)?)".&lt;br /&gt;For two years I just ignore this errors. Like serialization errors, it cause nothing, just annoying.&lt;br /&gt;&lt;br /&gt;I already compare my log4j xml configuration with any example from the web. It looks similar, but not same. So, I try to copy and paste the example, run the application, I saw no warning. Hmm ...&lt;br /&gt;After several try and error finally I realize that my configuration does not put the element in the order that the warning said.&lt;br /&gt;&lt;br /&gt;log4j dtd required us to write xml in the order like the warning said. You should not put appender after logger, or root at the first place. Your logging module will work fine, but you will get that annoying warning. So remember to write xml in that order&lt;br /&gt;&lt;br /&gt;&amp;lt;renderer&gt;&amp;lt;/renderer&gt;&lt;br /&gt;&amp;lt;renderer&gt;&amp;lt;/renderer&gt;&lt;br /&gt;&amp;lt;renderer&gt;&amp;lt;/renderer&gt;&lt;br /&gt;&amp;lt;appender&gt;&amp;lt;/appender&gt;&lt;br /&gt;&amp;lt;appender&gt;&amp;lt;/appender&gt;&lt;br /&gt;&amp;lt;appender&gt;&amp;lt;/appender&gt;&lt;br /&gt;&amp;lt;plugin&gt;&amp;lt;/plugin&gt;&lt;br /&gt;&amp;lt;plugin&gt;&amp;lt;/plugin&gt;&lt;br /&gt;&amp;lt;plugin&gt;&amp;lt;/plugin&gt;&lt;br /&gt;&amp;lt;logger&gt;&amp;lt;/logger&gt;&lt;br /&gt;&amp;lt;logger&gt;&amp;lt;/logger&gt;&lt;br /&gt;&amp;lt;logger&gt;&amp;lt;/logger&gt;&lt;br /&gt;&amp;lt;category&gt;&amp;lt;/category&gt;&lt;br /&gt;&amp;lt;category&gt;&amp;lt;/category&gt;&lt;br /&gt;&amp;lt;category&gt;&amp;lt;/category&gt;&lt;br /&gt;&amp;lt;root&gt;&amp;lt;/root&gt;&lt;br /&gt;&amp;lt;root&gt;&amp;lt;/root&gt;&lt;br /&gt;&amp;lt;root&gt;&amp;lt;/root&gt;&lt;br /&gt;&amp;lt;loggerfactory&gt;&amp;lt;/loggerfactory&gt;&lt;br /&gt;&amp;lt;loggerfactory&gt;&amp;lt;/loggerfactory&gt;&lt;br /&gt;&amp;lt;loggerfactory&gt;&amp;lt;/loggerfactory&gt;&lt;br /&gt;&amp;lt;categoryfactory&gt;&amp;lt;/categoryfactory&gt;&lt;br /&gt;&amp;lt;categoryfactory&gt;&amp;lt;/categoryfactory&gt;&lt;br /&gt;&amp;lt;categoryfactory&gt;&amp;lt;/categoryfactory&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-1640814968454845623?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/1640814968454845623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=1640814968454845623' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1640814968454845623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1640814968454845623'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2009/12/log4jwarn-content-of-element-type.html' title='log4j:WARN The content of element type &quot;log4j:configuration&quot; must match ....'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-6860978711942022496</id><published>2009-12-29T16:58:00.005+07:00</published><updated>2010-02-16T18:05:46.358+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Error'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='J2EE'/><category scheme='http://www.blogger.com/atom/ns#' term='Non Serializable'/><category scheme='http://www.blogger.com/atom/ns#' term='Tomcat'/><title type='text'>Non Serializable Error</title><content type='html'>I build a web application using JSF as Framework and Tomcat as web container. Every time I deploy or start the application it always show error Non Serializable bla bla bla. This error doesn't any impact to the application. However, it is very annoying. Especially when there are some errors. This junk make me difficult to find out what are the fatal errors that stop my application from working.&lt;br /&gt;&lt;br /&gt;I was ignore this errors for 2 years, now time to get rid of it. After googling I found that there are transient keyword for java class field. Adding this field told Java that it doesn't have to be save when application is closed.&lt;br /&gt;&lt;br /&gt;Adding transient remove the error, unfortunately finding fields that cause errors was not easy. The stack trace just tell that some field with some type are not serializable. However it does not tell me which fields that are cause this problems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-6860978711942022496?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/6860978711942022496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=6860978711942022496' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/6860978711942022496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/6860978711942022496'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2009/12/non-serializable-error.html' title='Non Serializable Error'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-6892157096026216515</id><published>2009-08-18T11:01:00.012+07:00</published><updated>2009-08-18T13:01:36.137+07:00</updated><title type='text'>Online Application Development</title><content type='html'>&lt;span style="font-family: verdana;font-size:130%;" &gt;Gathering Idea&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Development goals:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Connected: can be accessed from anywhere at anytime by any devices and anyone&lt;/li&gt;&lt;li&gt;Multimodel: It doesn't have to be web based application, can be desktop as well, connected desktop. It can also be something else (service, command line, etc).&lt;/li&gt;&lt;li&gt;Shared: every one can contribute for the applications. There will be groups of people that develop an application.&lt;/li&gt;&lt;li&gt;Online: develop using browser or connected environment. It should only need browser (plus some add in). Codes are compiled and run at servers. Browser show the result.&lt;/li&gt;&lt;li&gt;Fully provided: libraries,tools,services are provided and managed at servers&lt;/li&gt;&lt;li&gt;MultiVersion: developers may have their own versions&lt;/li&gt;&lt;li&gt;Scalable: simple to very complex application&lt;/li&gt;&lt;li&gt;Distributed: development resources are distributed at many places.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-6892157096026216515?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/6892157096026216515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=6892157096026216515' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/6892157096026216515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/6892157096026216515'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2009/08/online-application-development.html' title='Online Application Development'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-1042193352480778313</id><published>2009-06-24T10:03:00.004+07:00</published><updated>2009-06-24T10:16:48.749+07:00</updated><title type='text'>Blank ActiveX Control in IE6</title><content type='html'>I have weird problems with IE6. I create standard ActiveX control that only draw its version. I put it on HTML as object tag. I open the HTML with IE6. I move the mouse cursor on the ActiveX. There is a box and tooltip "click to activate and use this control". The ActiveX does not active yet, and I have to click it. I click it and it runs well.&lt;br /&gt;&lt;br /&gt;Next, I refresh the page, do the same thing again, still OK. In the same IE6 window, I change address in address bar to open other url. The problems happen. In this new page, there is a white box covering anything under it. This white box is on the same place and size as my ActiveX.&lt;br /&gt;&lt;br /&gt;It seem like IE6 does not reclaim the DC or dispose my ActiveX. I try in IE7 and every thing is OK. I start to search in the internet about this issue, but find no luck. At the last try, I search about "click to activate and use this control". I found url http://download.microsoft.com/download/8/b/d/8bdaf12b-f4af-4b81-a8da-db1e87da6e14/WindowsXP-KB945007-x86-ENU.exe and download the update. Install it and woalaaa, the bugs is gone.&lt;br /&gt;&lt;br /&gt;Strange solution for a strange bugs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-1042193352480778313?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/1042193352480778313/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=1042193352480778313' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1042193352480778313'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1042193352480778313'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2009/06/blank-activex-control-in-ie6.html' title='Blank ActiveX Control in IE6'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-8873784251525459230</id><published>2009-05-29T15:57:00.006+07:00</published><updated>2009-05-29T16:19:28.588+07:00</updated><title type='text'>Stop VS 2003 ASP.NET Application</title><content type='html'>I have several ASP.NET application in my IIS WebServer. Some times, I need to stop one of them, for example to unlock files, clear resources or other purpose.  Unfortunatelly, I cannot find any documentation that tell me how to do this. I can of course kill the working process, but this will stop all of applications in web server.&lt;br /&gt;&lt;br /&gt;During coding and debugging I see that when I build or compile application from VS 2003, my application is stop and restart again, but other applications still running.&lt;br /&gt;&lt;br /&gt;After several try and errors, finally I found that when I modify any files under in bin folder, my application was stop. For example I have main.dll inside bin folder of my application. I just rename it to main_tmp.dll then I rename it back to main.dll. This task, supprisingly will stop the ASP.NET application.&lt;br /&gt;&lt;br /&gt;This is probably related with how ASP.NET works. It will compile application pages to temporary directory. When it detect that some things is changed, than ASP.NET will stop the application and reload new files.&lt;br /&gt;&lt;br /&gt;this is from MS web sites:&lt;br /&gt;&lt;h3 class="subHeading"&gt;Application Restarts&lt;/h3&gt;&lt;div class="subsection"&gt;&lt;p&gt; Modifying the source code of your Web application will cause ASP.NET to recompile source files into assemblies. When you modify the top-level items in your application, all other assemblies in the application that reference the top-level assemblies are recompiled as well. &lt;/p&gt;&lt;p&gt; In addition, modifying, adding, or deleting certain types of files within the application's known folders will cause the application to restart. The following actions will cause an application restart: &lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;                     Adding, modifying, or deleting assemblies from the application's Bin folder.                 &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt; Adding, modifying, or deleting localization resources from the App_GlobalResources or App_LocalResources folders. &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;                     Adding, modifying, or deleting the application's Global.asax file.                 &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;                     Adding, modifying, or deleting source code files in the App_Code directory.                 &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;                     Adding, modifying, or deleting Profile configuration.                 &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;                     Adding, modifying, or deleting Web service references in the App_WebReferences directory.                 &lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;                     Adding, modifying, or deleting the application's Web.config file.                 &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt; When an application restart is required, ASP.NET will serve all pending requests from the existing application domain and the old assemblies before restarting the application domain and loading the new assemblies.&lt;br /&gt;&lt;/p&gt;&lt;/div&gt;for further references see:&lt;br /&gt;http://msdn.microsoft.com/en-us/library/ms178473.aspx&lt;br /&gt;&lt;br /&gt;don't get your self overcoded&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-8873784251525459230?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/8873784251525459230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=8873784251525459230' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/8873784251525459230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/8873784251525459230'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2009/05/stop-vs-2003-aspnet-application.html' title='Stop VS 2003 ASP.NET Application'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-2023841736698331497</id><published>2008-04-15T10:42:00.006+07:00</published><updated>2008-04-22T16:01:22.765+07:00</updated><title type='text'>JSF - Rock and Roll</title><content type='html'>I just started to create real application using JSF + VisualWeb. I've create sample or testing applications several times to explore it. But this time I was creating application that will be used by HR departement.&lt;br /&gt;&lt;br /&gt;So... I start to run NetBeans 6.0 in my computer. It slowly loads its modules. My computer is Pentium IV 2 years old. I think NetBeans required better computer than mine. Current technology use core 2 duo. When it started I found wizards to create different type of applications.&lt;br /&gt;&lt;br /&gt;I start it by create new visual web from a wizard. It automatically create basic files for web applications. It then present to me the default page of web application. I can drag and drop some components from palette edit its property and so on. It similar to desktop visual editor.&lt;br /&gt;&lt;br /&gt;Next, I want to link my application with database. NetBeans provide easy way to link database and visual components. All we have to do is drag and drop database components from database list and drop it to component. However, this mechanism is not stable and not always working. So I decide to use manual way to access database.&lt;br /&gt;&lt;br /&gt;I also try to use datasource and connection pooling. It is said that Java will manage connection automatically. Unfortunatelly this does not works too. After several connect and close, I am not able to connect to database anymore. So, again, I connect using datasource but still maintain database connection manually.&lt;br /&gt;&lt;br /&gt;Here I am, currently use manual mechanism to get access database and provide it to components. I was use table and drop down list in many pages. Both need link to a result set, some how, to populate the list.&lt;br /&gt;&lt;br /&gt;Here is code that I use to populate drop down and table:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;public void fillDropDown(String sql, DropDown dropDown, String keyFieldName, String textFieldName, boolean isAddEmpty) {&lt;br /&gt;try {&lt;br /&gt;ResultSet rs = executeQuery(sql);&lt;br /&gt;if (rs == null) {&lt;br /&gt;return;&lt;br /&gt;} else {&lt;br /&gt;ArrayList&lt;option&gt; optList = new ArrayList&lt;option&gt;();&lt;br /&gt;if (isAddEmpty){&lt;br /&gt;Option opt = new Option(null, "");&lt;br /&gt;optList.add(opt);&lt;br /&gt;}&lt;br /&gt;while (rs.next()) {&lt;br /&gt;Option opt = new Option(rs.getString(keyFieldName), rs.getString(textFieldName));&lt;br /&gt;optList.add(opt);&lt;br /&gt;}&lt;br /&gt;dropDown.setItems(optList);&lt;br /&gt;}&lt;br /&gt;} catch (Exception ex) {&lt;br /&gt;throw new RuntimeException(ex);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public void fillTable(String sql, Table table) {&lt;br /&gt;try {&lt;br /&gt;TableRowGroup trg = table.getTableRowGroupChild();&lt;br /&gt;trg.setSourceData(null);&lt;br /&gt;&lt;br /&gt;ResultSet rs = executeQuery(sql);&lt;br /&gt;if (rs == null) {&lt;br /&gt;return;&lt;br /&gt;} else {&lt;br /&gt;CachedRowSetXImpl cachedRowSet = new CachedRowSetXImpl();&lt;br /&gt;cachedRowSet.populate(rs);&lt;br /&gt;CachedRowSetDataProvider dp = new CachedRowSetDataProvider();&lt;br /&gt;dp.setCachedRowSet(cachedRowSet);&lt;br /&gt;&lt;br /&gt;trg.setSourceData(dp);&lt;br /&gt;}&lt;br /&gt;} catch (Exception ex) {&lt;br /&gt;throw new RuntimeException(ex);&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note that it does not create Table Column. Designer provide a nice way to create and manage column. It does not automatically create column. You can add new TableColumn by code to TableRowGroup.getChildren() collections.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-2023841736698331497?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/2023841736698331497/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=2023841736698331497' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/2023841736698331497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/2023841736698331497'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2008/04/jsf-rock-and-roll.html' title='JSF - Rock and Roll'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-2166442817918754330</id><published>2008-03-21T20:44:00.002+07:00</published><updated>2008-03-26T19:34:00.656+07:00</updated><title type='text'>Runtime Compiler Problems</title><content type='html'>My Application (ASP.NET with FX 1.1) need to provide certain users to be able to input syntaxes or scripts. From the internet I found that I can compile code at run time and execute it as part of my application. It seems interesting and I don't have spent many time since it was provided with sample code. Basically it uses Microsoft.CSharp.CSharpCodeProvider to compile code and load it in new assembly.&lt;br /&gt;&lt;br /&gt;Its been years and my application just fine with that until one of my customers has about 300 users and about 4000 transaction a day. This should be small amount of users or transactions. My Application also still run fast enough. However it is very greedy consuming memory. In busy hours it only takes two hour before it consumes 1GB memory and then crash. This is also wierd. The machine still have 500MB free memory but .NET already crash.&lt;br /&gt;&lt;br /&gt;The application logs show the following errors when compile user's scripts:&lt;br /&gt;&lt;strong&gt;"Not enough storage is available to process this command"&lt;/strong&gt;&lt;br /&gt;It means that asp worker process dows not have enough memory to compile the code.&lt;br /&gt;Several references suggest me to analyze worker process memory using windbg.exe that you can get from microsoft &lt;a href="http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#ERB"&gt;http://www.microsoft.com/whdc/devtools/debugging/installx86.mspx#ERB&lt;/a&gt; and load C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\SOS.dll within it. I show in the following step:&lt;br /&gt;1. Download WinDbg.exe from microsoft&lt;br /&gt;2. Run WinDbg.exe&lt;br /&gt;3. Click file menu, click Attach to a Process, and select w3wp.exe or aspnet_wp.exe.&lt;br /&gt;4. At this time the application will stop running.&lt;br /&gt;5. Execute .load SOS.dll. If it is can not be found, at SOS.dll to your PATH variable.&lt;br /&gt;6. Execute g to continue running application&lt;br /&gt;7. Click debug menu, click break to pause application and start debugging.&lt;br /&gt;&lt;br /&gt;After running !DumpDomain command several time after each transaction I notice that loaded assembly is growing. New assemblies are compiled code and .net never unload them. Unfortunatelly there is also no way to unload them manually. The only way to unload assembly is by unload the AppDomain.&lt;br /&gt;&lt;br /&gt;Finally I create the compiler in other application. Main application communicates with this compiler application using TCPIP and custom messaging. Another alternatives are using Remote Procedure Call as communications.&lt;br /&gt;&lt;br /&gt;The memory of compiler application will still growing. However when it reach certain value&lt;br /&gt;(Process.GetCurrentProcess.WorkingSet &gt; number of bytes), the process terminates itself and main application will spawn new compiler processes.&lt;br /&gt;&lt;br /&gt;This whole technics will keep main application memory at reasonable size and at the same time let me utilize .net compiler at runtime.&lt;br /&gt;&lt;br /&gt;Well Done&lt;br /&gt;&lt;br /&gt;Harun&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-2166442817918754330?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/2166442817918754330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=2166442817918754330' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/2166442817918754330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/2166442817918754330'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2008/03/runtime-compiler-problems.html' title='Runtime Compiler Problems'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-5193763298542378066</id><published>2008-03-12T15:54:00.012+07:00</published><updated>2011-03-30T09:59:30.994+07:00</updated><title type='text'>VS 2003 in VISTA &amp; Win7, Installation Struggle</title><content type='html'>That's right, I'm struggling when install VS 2003 in Vista. Actually when install anything in Vista. I don't blaim Vista or Microsoft. They do this to fight against viruses and mailware. This is also the reason why I move to Vista. They have better protection from viruses.&lt;br /&gt;&lt;br /&gt;Microsoft said that they will not support VS 2003 on Vista. However like Brian Murphy said, "Not supported" doesn't mean "won't work". It works, at least for me for now. It was not easy but I have to do this, since I dont want to upgrade my code.&lt;br /&gt;&lt;br /&gt;First problems start when I install VS 2003. It said that it can not find "Front Page Extension...". Don't worry with this warning, just click skip button. ASP.NET will not used it or as an alternative we can use fileshare. Continue to install all necessary thing. Don't forget to install .NET Framework 1.1 SP1 and any updates. It is required to avoid crash and bugs.&lt;br /&gt;&lt;br /&gt;After installation and updates are completed, do the following steps, such as described by Brian Murphy here: &lt;a href="http://blogs.iis.net/brian-murphy-booth/archive/2007/03/09/how-to-setup-asp-net-v1-1-visual-studio-net-2003-projects-on-iis7-vista.aspx"&gt;http://blogs.iis.net/brian-murphy-booth/archive/2007/03/09/how-to-setup-asp-net-v1-1-visual-studio-net-2003-projects-on-iis7-vista.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Note that I add my own steps to make it works in my computer&lt;br /&gt;&lt;ol&gt;&lt;li&gt;1. Ensure that .NET 1.1 SP1 is properly installed.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Vista does not include .NET v1.1 by default.&lt;/li&gt;&lt;li&gt;Because .NET 1.1 is not included by default, .NET v1.1 *SP1* is also not included.&lt;/li&gt;&lt;li&gt;Without SP1, W3WP.exe will crash when running an appPool under v1.1 due to DEP&lt;/li&gt;&lt;li&gt;To check this, make sure that "c:\Windows\Microsoft.NET\Framework\v1.1.4322\mscorsvr.dll" is version "1.1.4322.2032" or higher.&lt;/li&gt;&lt;li&gt;Unless you are 100% sure that SP1 for .NET is installed, you *really* should double-check this.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Enable IIS 6.0 compatibility&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Open "Control Panel"&lt;/li&gt;&lt;li&gt;Double-click "Programs and Features"&lt;/li&gt;&lt;li&gt;Click "Turn Windows features on or off" menu in the left pane&lt;/li&gt;&lt;li&gt;Expand "Internet Information Services"&lt;/li&gt;&lt;li&gt;Expand "Web Management Tools"&lt;/li&gt;&lt;li&gt;Check "IIS 6 Management Compatibility"&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Enable Windows Authentication Mode&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Open "Control Panel"&lt;/li&gt;&lt;li&gt;Double-click "Programs and Features"&lt;/li&gt;&lt;li&gt;Click "Turn Windows features on or off" menu in the left pane&lt;/li&gt;&lt;li&gt;Expand "Internet Information Services"&lt;/li&gt;&lt;li&gt;Expand "World Wide Web Services"&lt;/li&gt;&lt;li&gt;Expand "Security"&lt;/li&gt;&lt;li&gt;Check "Windows Authentication"&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Register v1.1 with IIS&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Open a CMD prompt&lt;/li&gt;&lt;li&gt;Change your directory to c:\Windows\MIcrosoft.net\Framework\v1.1.4322&lt;/li&gt;&lt;li&gt;Run "aspnet_regiis -ir -enable"&lt;/li&gt;&lt;li&gt;"ir" registers v1.1 with IIS but doesn't change any existing script mappings&lt;/li&gt;&lt;li&gt;"enable" marks aspnet_isapi.dll as "Allowed" under "ISAPI and CGI Restrictions"&lt;/li&gt;&lt;li&gt;aspnet_regiis should also create a new AppPool under "Application Pools" called "ASP.NET 1.1" that is configured with the "Classic" pipline, and "Enable32BitAppOnWin64" set to true if a 64-bit OS.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Make the new "ASP.NET 1.1" appPool the default.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Open the IIS manager&lt;/li&gt;&lt;li&gt;Select the "Web Sites" folder.&lt;/li&gt;&lt;li&gt;Under "Actions" on the upper right, click "Set Web Site Defaults..."&lt;/li&gt;&lt;li&gt;Change the "Application Pool" setting to "ASP.NET 1.1"&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;**Alternative step to 4** - Change the AppPool to "ASP.NET 1.1" after creating the ASP.NET project instead of making it the default.&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Create the v1.1 ASP.NET project via Visual Studio. Attempting to run the project at this point will fail if the 1.1 appPool is not the default.&lt;/li&gt;&lt;li&gt;Open the IIS manager.&lt;/li&gt;&lt;li&gt;Right-click the newly create application directory and choose "Advanced Settings"&lt;/li&gt;&lt;li&gt;Change the "Application Pool" to "ASP.NET 1.1"&lt;/li&gt;&lt;li&gt;Go back to Visual Studio and attempt to run/debug project.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Register Trusted Site&lt;/li&gt;&lt;ul&gt;&lt;li&gt;Open internet explorer option from IE or control panel&lt;/li&gt;&lt;li&gt;Click Security Tab, click Trusted sites, click Sites button&lt;/li&gt;&lt;li&gt;Uncheck "Require server verification...", add &lt;a href="http://localhost/"&gt;http://localhost/&lt;/a&gt;, click close&lt;/li&gt;&lt;li&gt;Set security level to Low&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;Run as Administrator&lt;/li&gt;&lt;ul&gt;&lt;li&gt;We have to run VS 2003 as Administrator or otherwise files are not accessible with access denied errors&lt;/li&gt;&lt;li&gt;To do this right click VS 2003 short cut or exe file then click Run as administrator&lt;/li&gt;&lt;li&gt;Another way is right click VS 2003 short cut, then click properties. In Compatibility tab, check "Run this program as administrator"&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;"Register Trusted Site" is to solve my last problems. When I run the application it said that I can not debug the process because I dont have permission. I should be a member of 'Debugger Users'. I also follow many suggestions and many other articles but it does not work. Accidently I found that VS 2003 or VISTA show another error when I run using another user. It said that the server is not in trusted site or some thing similar. I saw this before and add &lt;a href="http://localhost/"&gt;http://localhost/&lt;/a&gt; to trusted site then set the level to medium-low. When I do this, 'Debugger Users' errors shown. When I set the Trusted Zone security level to Low, all works fine.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-5193763298542378066?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/5193763298542378066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=5193763298542378066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5193763298542378066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5193763298542378066'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2008/03/vs-2003-in-vista-installation-struggle.html' title='VS 2003 in VISTA &amp; Win7, Installation Struggle'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-8318334421877330391</id><published>2008-03-05T19:24:00.001+07:00</published><updated>2008-03-05T19:25:36.293+07:00</updated><title type='text'>Memory Management in Windows</title><content type='html'>&lt;p&gt;Original: &lt;a href="http://www.msfn.org/board/lofiversion/index.php/t62001.html"&gt;http://www.msfn.org/board/lofiversion/index.php/t62001.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;I have several users running Windows XP SP2 and Outlook 2003. They save many of their e-mails to a network drive. When they save these e-mails, they first change the subject line (or the name of the file) and then save it as a .msg file to a network drive. After they have saved numerous e-mail successfully, they will inevitably receive the error "not enough storage is available to process this command" when trying to save these files to a network drive. At that point, they cannot save anymore e-mails until they reboot their machine. Does anyone know what the fix is for this error?&lt;/p&gt;&lt;p&gt;You should be getting an event in the eventviewer on a machine exhibiting these symptoms - any idea what the source and event ID number are for these? Usually, this is a network issue caused by a low memory condition - the storage space in question isn't a storage space issue that you'd think of as in disk storage, but as in space in memory to store another request. You can try a few things to get around this, but it's almost always a low memory condition on the workstation that is causing these errors.This can be caused by the server service running out of process memory, by a process on your system consuming memory handles and not releasing them properly (*cough*antivirus*cough), or even too many values in a particular registry key on the system (HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters\NullSessionPipes).You can try a few things on your workstations to see which (if any) of the following makes any difference:1. You can modify the IRPStackSize parameter in the registry to increase the memory size made available to new applications.Key: HKLM\SYSTEM\CurrentControlSet\Services\lanmanserver\parametersValue: IRPStackSizeType: REG_DWORDData: 15 (can set as high as 50)The default in NT and 2000 is 11, and in XP and 2003 the default is 15. The allowed values are 11 - 50 for this entry. A higher number will result in more memory size available for new applications, but can cause issues on systems running large numbers of applications.2. You can try increasing the "beef" of the Memory Manager in Windows by making the following changes (these need to be made as a set - you can't just set one or two, you have to use all or nothing or the changes won't make much difference):Key: HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management----------Value: LargeSystemCacheType: REG_DWORDRadix: HexData: 0Determines whether the system maintains a standard size or a large size file system cache, and influences how often the system writes changed pages to disk.Possible values:0 - Establishes a standard size file-system cache of approximately 8MB. The system allows changed pages to remain in physical memory until the number of available pages drops to approximately 1,000.1 - Establishes a large system cache working set that can expand to physical memory, minus 4 MB, if needed. The system allows changed pages to remain in physical memory until the number of available pages drops to approximately 250.--------------------Value: PoolUsageMaximumType: REG_DWORDRadix: HexData: 3CDetermines when the Memory Manager starts trimming the PagedPool area of kernel memory, to free up space for additional resources that may need space in the kernel's PagedPool memory area. The default for this trimming process is 80 percent.Setting the value at 3C (60) informs the Memory Manager to start the trimming process at 60 percent of PagedPoolMax rather than the default setting of 80 percent. If a threshold of 60 percent is not enough to handle spikes in activity, reduce this setting to 50 percent, or even lower.--------------------Value: PagedPoolSizeType: REG_DWORDRadix: HexData: 0Determines the size of the kernel's PagedPool memory area that is created during the boot process. Setting PagedPoolSize to 0 allows the Memory Manager to determine the appropriate PagedPool memory size during the boot process.--------------------Value: SystemPagesType: REG_DWORDRadix: HexData: FFFFFFFFDefines the number of system page table entries that are reserved for mapping I/O buffers and other information into the system address space. Each system page table entry maps one page.Possible values:0x0 - The system calculates an optimal number of page table entries based on the platform type and the amount of memory available to the system. The system adjusts this value if the amount of memory changes.0x1-0xFFFFFFFE - Specifies the number of reserved page table entries. This value takes precedence over the system's calculated value, and it prevents the system from adjusting the value.0xFFFFFFFF - Maximize system pages. The system creates the largest number of page table entries possible within physical memory. The system monitors and adjusts this value dynamically when the configuration changes.Approximate valuesFFFFFFFF = tells OS to set the maximum number of PTEs allowed24FFF = 150,000 PTEsBFFF = 50,000 PTEs7FFF = 32,000 PTEs----------Otherwise, running perfmon against the machine in question until the machine starts exhibiting symptoms is the only way to see what, if anything, is using large amounts of memory, or if you have an application that is "leaking". &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-8318334421877330391?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/8318334421877330391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=8318334421877330391' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/8318334421877330391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/8318334421877330391'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2008/03/memory-management-in-windows.html' title='Memory Management in Windows'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-1257299376869283154</id><published>2008-03-04T22:16:00.002+07:00</published><updated>2008-03-05T00:06:27.313+07:00</updated><title type='text'>Vista Installation</title><content type='html'>I'm trying to install Vista on my notebook. I thought it gone be as easy as usual. It does not take a long time compared to XP if every things can works fine. First problems happen when I try to install from current Windows XP. I don't have empty drive and have to clear one of them. I don't realize this at this moment and try to install Vista by boot from CD.&lt;br /&gt;&lt;br /&gt;I restart my computer, boot from CD, loading files, starting Windows, upps. Errors happen:&lt;br /&gt;&lt;br /&gt;"A problem has been detected and Windows has been shut down to prevent damageto your computer.If this is the first time you've seen this Stop error screen,restart your computer. If this screen appears again, followthese steps:The BIOS in this system is not fully ACPI compliant. Please contact yoursystem vendor for an updated BIOS.Technical information:*** STOP: 0x000000A5 (0x00000011,0x00000007,0xFFD0D010,0x0100000E).."&lt;br /&gt;&lt;br /&gt;what is this? Start googling, found same problems, but almost no solution, almost except from a site that refer to &lt;a href="http://monka.hysteria.cz/marko/var/vista/acpi.txt"&gt;http://monka.hysteria.cz/marko/var/vista/acpi.txt&lt;/a&gt;. It said that easiest way is to install Vista from Windows and rename two files. I did it.&lt;br /&gt;&lt;br /&gt;I install Vista from my XP, and after copy some files, it is restarted. Unfortunatelly I don't know how and where to modify those files. Each time my computer restart it ends with blue screen. I decide to use the windows 2003 instalation CD to boot and goes to repair mode. Try to do this and that but no result. Then, I restart the computer again, some how I saw boot option to earlier version of windows. Hmmm... I choose it and I'm back to my XP.&lt;br /&gt;&lt;br /&gt;Within this OS I can see some of windows installation file located at this directory:&lt;br /&gt;C:\$WINDOWS.~BT\Windows or something similar. I locate the files which are halacpi.dll and halmacpi.dll, in C:\$WINDOWS.~BT\Windows\system32\. However I didn't find hal.dll. Still I try to rename halacpi.dll to halmacpi.dll and vice versa. Then I boot again. Magically it boot well and continue the installation process until it complete.&lt;br /&gt;&lt;br /&gt;It is not over yet. After installation completed Vista reboot my computer, and it start happened again. Some how Vista fail to boot, so I boot to XP again and locate those files in Vista installation directory. In may computer it is E:\Windows\system32\. I also find hal.dll here. So I rename the hal.dll and switch halacpi.dll and halmacpi.dll. Restart again it worked, until installation finish, and I run my Vista this time.&lt;br /&gt;&lt;br /&gt;Now I upgrading my windows and hope nothing strange again.&lt;br /&gt;&lt;br /&gt;fyuh&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-1257299376869283154?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/1257299376869283154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=1257299376869283154' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1257299376869283154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1257299376869283154'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2008/03/vista-installation.html' title='Vista Installation'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-6527638291520607164</id><published>2008-01-29T17:10:00.001+07:00</published><updated>2008-01-29T17:23:19.502+07:00</updated><title type='text'>Finding Your Device Driver</title><content type='html'>I got problems with my USB to Serial Device. Device driver is missing, some how. No information in the device, since it is only a cable with USB port in one side and RS232 port in another side. So I don't have driver and I don't know what driver is who made this product.&lt;br /&gt;&lt;br /&gt;I try to plug the USB port to computer fortuntelly windows detect it and ask for driver that I don't have. I try some famous driver like prolific but it does not work. I open the device manager and try to find any clue.&lt;br /&gt;&lt;br /&gt;In the Details tab when I select "Device Instance Id" there is information like this:&lt;br /&gt;USB\VID_058F&amp;amp;PID_9720\5&amp;amp;28985B2&amp;amp;0&amp;amp;1&lt;br /&gt;&lt;br /&gt;put those information and start googling, found only a page that refer to prolific device. However this one is also not working. When I select the inf file, windows saying that it can not find files for the device. I open the inf file and found a line that contains PID_2303 but I can not find PID_9720. May be this is the problems.&lt;br /&gt;&lt;br /&gt;I google again and this time only put PID_9720 in key word. This time I google give me list of several sites and one of them seem promising. It provided driver for USB to Serial for Astro Cable. Download files and run setup.. and thanks God, It works.&lt;br /&gt;&lt;br /&gt;So, next time if you have a hardware with no information, try to lookat the "Device Instance Id" to get device information and start googling with it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-6527638291520607164?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/6527638291520607164/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=6527638291520607164' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/6527638291520607164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/6527638291520607164'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2008/01/finding-your-device-driver.html' title='Finding Your Device Driver'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-4200430226875754197</id><published>2008-01-28T10:28:00.002+07:00</published><updated>2008-03-04T22:15:03.831+07:00</updated><title type='text'>Ordered Field</title><content type='html'>I have problems with ordered field in database.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It is more than just autoincrement field. It must be ordered correctly.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, that all data in this field should be 1,2,... N with no holes and no duplication.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;User also allowed to move field from one position to another.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So the problems are:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- User can enter new data into any index&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Use can move data from one index into another&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- When user delete a data, all index must be rearranged to eliminate the hole&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- This order is in the group of other fields.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Let's take an example.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There are questions data numbered question 1,2... N&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Questions are group by Topic.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here are the data&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Database -- &lt;= this is the Topic&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. What is RDBMS stand for?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. What is normalization?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. How to select from two tables?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- OOP --&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. Explain about OOP!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. What difference of Object and Class?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3. Explain polimorphism!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4. What differences of public, protected, and private!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Java --&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1. How to create dialog box?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2. How to communicate with other application?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;There are three topic: Database, OOP, and Java.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Each topic has several question.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When user create new question, a dialog is shown.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It contains several fields:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Topic: as combo box to select from available topic&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- No: the ordered field&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;-- Question: Memo to enter question&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The problems is in the No field.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Default value if No is max value + 1.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;However this also depend on selected topic.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this example, if user select "Database" then&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;default value of No is 4, "OOP" is 5 and "Java" is 3.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I can not just modify the NO field each time user change the Topic.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;They may already enter for example 2 then change the Topic.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The simple way to solve the problems is treat 0 as default.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Mean that if NO value is 0 then let application to determine the value.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this case my application will set it to max + 1.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This also solve problems when two user from different computer,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;enter data at the same time. One of them will not set&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;the No value correctly.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;User is allowed to enter other value. When user save the new data,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Application will check NO value. If it is less than 1 or greater than&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;max, it will set to max+1. Other value is saved as is.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;When new value is not max + 1, application need to reorder NO.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;use query to make this happen:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;update Questions&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;set NO = NO + 1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;where NO &gt; @newval and topic = @seltopic&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Update NO is more complex.&lt;br /&gt;&lt;br /&gt;If old value is less than new value, then&lt;br /&gt;&lt;br /&gt;execute this query:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;update Questions&lt;br /&gt;set NO = NO - 1&lt;br /&gt;where NO &lt;= @newval and NO =&gt; @oldvalue&lt;br /&gt;&lt;br /&gt;and topic = @seltopic&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;if old value is greater than new value, then&lt;br /&gt;&lt;br /&gt;update Questions&lt;br /&gt;&lt;br /&gt;set NO = NO + 1&lt;br /&gt;&lt;br /&gt;where NO =&gt; @newval and NO =&lt; @oldvalue and topic = @seltopic&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-4200430226875754197?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/4200430226875754197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=4200430226875754197' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/4200430226875754197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/4200430226875754197'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2008/01/ordered-field.html' title='Ordered Field'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-8874574432229348810</id><published>2007-12-26T09:54:00.000+07:00</published><updated>2007-12-26T10:24:17.529+07:00</updated><title type='text'>Oracle</title><content type='html'>Ternyata ngatur Oracle di linux repot juga. Di kantor ada satu PC yang digunakan untuk development Oracle. Namanya development, database yang diinstall disitu cukup banyak. Sekitar 6 database. Akibatnya hard disk nya cepet penuh, dan kalau udah gitu server nya bakalan crash.&lt;br /&gt;&lt;br /&gt;Sebelum-sebelumnya sih tidak ada masalah dengan hal ini. Namun, saat DB Admin nya cuti lama, entah kapan akan masuk, dan ngga' ada yg ngerti cara menangani masalah ini, semua orang jadi pusing. Ditambah lagi yg ngerti linux juga hanya beberapa orang.&lt;br /&gt;&lt;br /&gt;Setelah lihat sana-sini, solusi yg diambil adalah restart linux nya :D. Saat naik lagi, database yg sering dipakai udah nyala dan siap digunakan. Eit... tunggu dulu. Beberapa aplikasi bisa mengakses database dengan baik tanpa masalah, tapi aplikasi Java yang menggunakan JDBC tidak bisa login. Ada error dari Oracle nya yang kira-kira bilangnya SID yg digunakan untuk koneksi tidak ditemukan.&lt;br /&gt;&lt;br /&gt;Selidik sana sini sambil googling, ternyata methode yang digunakan untuk login dari ODBC windows dan JDBC rada beda. ODBC login dengan menggunakan 'Service Name' sedangkan JDBC login dengan menggunakan SID. Entah kenapa yg handle SID di server ngga' jalan dan ngga' ada yg tahu cara jalanin nya. Untungnya dari google ketemu cara konek ke JDBC dengan menggunakan Service Name. Syntaxnya panjang tapi berhasil konek dengan baik. wyuuuh.&lt;br /&gt;Untuk menyamakan dengan yg windows, akhirnya library koneksi aplikasi Java menggunakan Service Name.&lt;br /&gt;&lt;br /&gt;DsUrl = "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST={0})(PORT={1}))(CONNECT_DATA=(SERVICE_NAME={2})))";&lt;br /&gt;&lt;br /&gt;Setelah beberapa hari, beberapa teman ada yg complain, mereka bilang database yg mereka gunakan ngga' naik. Hmmm lihat konfigurasi sana sini ternyata untuk menaikkan database command nya adalah dbstart dan agar database bisa naik harus didaftarkan di "\etc\oratab".&lt;br /&gt;Di situ ada konfigurasi Y or N. pilih Y agar database nya naik. Problem nya kalau jalanin dbstart berulang-ulang, ternyata process yg lama ngga' di stop. Setelah coba sana-sini, akhirnya Linuxnya direstart lagi. Setelah up, semua jalan dengan baik dan benar.&lt;br /&gt;&lt;br /&gt;Sambil trouble shooting Oracle linux yg makan waktu berhari-hari, kami putuskan untuk menginstall Oracle di Windows. Tinggal next-next semua OK. Cara maintenance nya seperti aplikasi windows lain yaitu melalui "Service". Configure nya juga lebih mudah, mungkin karena kami lebih familiar dengan Windows nya.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-8874574432229348810?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/8874574432229348810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=8874574432229348810' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/8874574432229348810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/8874574432229348810'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2007/12/oracle.html' title='Oracle'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-2416191963404844263</id><published>2007-12-18T19:42:00.001+07:00</published><updated>2010-04-08T15:03:16.540+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ODBC'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='DSN Not Found'/><category scheme='http://www.blogger.com/atom/ns#' term='DSN'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='2003'/><category scheme='http://www.blogger.com/atom/ns#' term='64Bit'/><category scheme='http://www.blogger.com/atom/ns#' term='64'/><title type='text'>ASP.NET Application in Windows 2003 64bit</title><content type='html'>This morning my team is try to install my application in Windows 2003 64 bit server. The application is ASP.NET that build with Visual Studio 2003 with .NET Framework 1.1 sp1. We already install it on many window 2003 machines and all works just fine. However none of them is 64bit. Usually installation in windows 2003 or windows 2000 is easier than in Windows XP. There is alot of problems in Windows XP just to make its IIS runs ASP.NET application.&lt;br /&gt;&lt;br /&gt;Unfortunatelly, bad things happen when we start to install in Windows 2003 64 bit. Installation is complete smoothly. Then, we try to browse the logon page with IE. IE shows nothing except "Service Unavailable" text. Hmm... At this time I do not realize that we use Windows 2003 64. I never get this error. So I start to googling, and some site recommend me to look at event viewer. I saw it started to realize that the problems is caused by 64-32 bit incompatibility.&lt;br /&gt;&lt;br /&gt;I was googling again, and this time is to find out how to run my 32bit application in 64 bit windows. Some site said that .Net Framework 1.1 can only run in 32bit mode. Finally found articles in the following links:&lt;br /&gt;&lt;a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/13f991a5-45eb-496c-8618-2179c3753bb0.mspx?mfr=true"&gt;http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/13f991a5-45eb-496c-8618-2179c3753bb0.mspx?mfr=true&lt;/a&gt;&lt;br /&gt;also this one:&lt;br /&gt;&lt;a href="http://www.issociate.de/board/post/430775/IIS6_and_ASP.NET.html"&gt;http://www.issociate.de/board/post/430775/IIS6_and_ASP.NET.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;it told me to run this from command prompt:&lt;br /&gt;C:\Inetpub\adminscripts\cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 "true"&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Test the browser again whala.. Still not working, but IIS is running now. "Service Unavailable" message is gone but ASP.NET was still not running yet. Thanks to the second links above that told me to check IIS configuration:&lt;br /&gt;"Make sure that the status of ASP.NET version 1.1.4322 is set to Allowed in the Web service extension list in Internet Information Services Manager"&lt;br /&gt;&lt;br /&gt;And.. it is "Prohibited" so I change it to "Allowed". Open again and thanks God, it works.&lt;br /&gt;&lt;br /&gt;It seem that every thing is fine, until my friend told me that he can login to database. He sure that all configuration is set and correct. We use odbc to connect to database. It minimizes effort to configure database connections.&lt;br /&gt;&lt;br /&gt;In applications log, the odbc error message is "DSN not found...". This is wierd. The DSN is there and configuration is correct. Hmm... may be some thing with permission blocking ASP.NET to get the DSN. So, I change the IIS application pool configuration to run worker process using system user to get highest permission. I also set ASP.NET to run with "SYSTEM" user instead of "machine". Still no luck. Same message occures.&lt;br /&gt;&lt;br /&gt;Googling again about DSN not found error and this time I put 64 bit word too. Finally, it is there. well Their problems does not exactly same but the solution does. The site:&lt;br /&gt;&lt;a href="http://support.citrix.com/article/CTX110813"&gt;http://support.citrix.com/article/CTX110813&lt;/a&gt;&lt;br /&gt;told me to configure ODBC from C:\windows\SysWow64\odbcad32.exe instead of Start &gt; Control Panel &gt; Administrative Tools &gt; Data Sources (ODBC).&lt;br /&gt;&lt;br /&gt;Try again, login again, and... success.&lt;br /&gt;Finally... God, thanks again.&lt;br /&gt;&lt;br /&gt;See that in every problems there are solutions. All we have to do is search and dig to get them out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-2416191963404844263?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/2416191963404844263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=2416191963404844263' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/2416191963404844263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/2416191963404844263'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2007/12/aspnet-application-in-windows-2003.html' title='ASP.NET Application in Windows 2003 64bit'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-1712214068329854145</id><published>2007-12-13T11:31:00.000+07:00</published><updated>2007-12-13T13:07:03.322+07:00</updated><title type='text'>VS 2003 &amp; earlier is not supported in Vista</title><content type='html'>See the following FAQ:&lt;br /&gt;&lt;br /&gt;&lt;a id="Intro"&gt;FAQ: Visual Studio and Windows Vista&lt;/a&gt;&lt;br /&gt;Q: What products are supported?&lt;br /&gt;A: We are supporting Visual Basic 6.0, Visual FoxPro 9.0 and &lt;a href="http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx"&gt;Visual Studio 2005 Service Pack 1&lt;/a&gt; with the Visual Studio 2005 Service Pack 1 Update for Windows Vista.&lt;br /&gt;&lt;br /&gt;Q: What products aren't supported?&lt;br /&gt;A: Except for the 3 products above, Microsoft does not support Visual Studio 2003 or earlier.&lt;br /&gt;&lt;br /&gt;Q: What guidance do you offer?&lt;br /&gt;A: If you are currently using Visual Basic 6.0 you can continue to use it to create your applications. If you are using any other Microsoft development tool except Visual Studio 2005, we recommend that you upgrade to Visual Studio 2005. If you are using Visual Studio 2005 then we recommend that you install &lt;a href="http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx"&gt;Visual Studio 2005 Service Pack 1&lt;/a&gt; and the Service Pack 1 Update for Windows Vista.&lt;br /&gt;&lt;br /&gt;Q: Can I run Visual Studio 2005 on Vista even if it is not supported?&lt;br /&gt;A: While we do not block you from running any Microsoft development tool we only support Visual Basic 6.0 and &lt;a href="http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx"&gt;Visual Studio 2005 Service Pack 1&lt;/a&gt; with the Visual Studio 2005 Service Pack 1 Update for Windows Vista. Running other Microsoft development tools will result in unexpected behavior.&lt;br /&gt;&lt;br /&gt;Q: Is there any difference between Visual Studio 2005 RTM and Visual Studio 2005 SP1 on Vista?&lt;br /&gt;A: No. The only change is a warning that Visual Studio 2005 should be run with elevated privileges on Windows Vista.&lt;br /&gt;&lt;br /&gt;Q: When will the Vista Support Update be available?&lt;br /&gt;A: We will be releasing the Service Pack 1 Update for Windows Vista in the first quarter of 2007. A beta of this update is available now. For more information, see &lt;a href="http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx"&gt;Visual Studio 2005 Service Pack 1&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Q: By not supporting Visual Studio.NET 2003 on Windows Vista, aren't you forcing customers to upgrade to Visual Studio 2005?&lt;br /&gt;A: We feel strongly that the new features available for developers on Windows Vista are best targeted using Visual Studio 2005. Windows Vista contains many significant advances, and Visual Studio 2005 is the best toolset for building applications that take advantage of those advances. Examples of this type of support include:&lt;br /&gt;Enhanced C++ features for security and C++/CLI make it easier to develop applications that take advantage of managed and unmanaged code features in Windows Vista&lt;br /&gt;Support for the .NET Framework 2.0. (Windows Vista ships with .NET Framework 3.0 pre-installed. The .NET Framework 2.0 is a proper subset of the .NET Framework 3.0 and thus fully supported)&lt;br /&gt;Support for pre-releases and CTPs that are designed to provide support for Windows Vista development. Examples of these are found on the &lt;a href="http://msdn.microsoft.com/vstudio/future/"&gt;Visual Studio Futures Page.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Q: Why support Visual Basic 6 and not Visual Studio.NET 2003 on Windows Vista?&lt;br /&gt;A: Visual Basic 6.0 is still being supported because that upgrade is more difficult. Microsoft is committed to making the developer experience on Windows Vista as simple and productive as building application on Windows XP is today. However, Visual Studio 2003 or earlier would require many changes that make that experience worse. Customers will find that upgrading to Visual Studio 2005 will not only improve their developer experience but make developing on Windows Vista easier.&lt;br /&gt;&lt;br /&gt;Q: If Visual Studio .NET 2002 and 2003 won't be supported on Windows Vista, will my existing applications still work?&lt;br /&gt;A: Yes. Only the development environments will not be supported. The .NET Framework 1.1 and 2.0 runtimes will still run on Windows Vista.&lt;br /&gt;&lt;br /&gt;Q: What makes it so technically challenging to support Visual Studio.NET 2002 and Visual Studio .NET 2003 on Windows Vista?&lt;br /&gt;A: As those of you who have tested your software on Windows Vista know, some of the changes in the operating system have a particular impact on developer tools given that most users run as an administrator on their local machine. We have made tremendous investments in Windows Vista to ensure backwards compatibility, but some of the system enhancements, such as User Access Control and changes to parts of the networking stack would require substantial work on Vista.&lt;br /&gt;&lt;br /&gt;Q: Why are you only telling Visual Studio customers now of the support plans?&lt;br /&gt;A: We are making developers aware of our support plans as a part of some of our larger announcements around &lt;a href="http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx"&gt;Visual Studio 2005 Service Pack 1&lt;/a&gt;. We believe that making this information available prior to the release of Windows Vista gives developers sufficient time.&lt;br /&gt;&lt;br /&gt;Q: Why are you encouraging developers to begin testing their applications on Windows Vista now if you still don't have tools that run on the operating system?&lt;br /&gt;A: Early testing is critical to ensuring that developers are prepared for the impact the changes to the operating system may have on their applications. We are going through this process now with Visual Studio 2005. We are working to ensure that developers have the best possible experience working with Visual Studio 2005 on Windows Vista.&lt;br /&gt;&lt;br /&gt;Q: Why didn't you include Windows Vista support in Service Pack 1 for Visual Studio 2005?&lt;br /&gt;A: Delivering great product quality is something that we have always aimed for. We wanted to deliver the update to Visual Studio 2005 as soon as possible to our existing customers. We intend to deliver the Visual Studio 2005 Service Pack 1 Update for Windows Vista in the first quarter of 2007. A beta of this update is available now. For more information, see &lt;a href="http://msdn.microsoft.com/vstudio/support/vs2005sp1/default.aspx"&gt;Visual Studio 2005 Service Pack 1&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Q: What if developers want to upgrade existing applications to run on Windows Vista?&lt;br /&gt;A: We are committed to helping developers move their .NET Framework 1.1 code to the .NET Framework 2.0 and 3.0.&lt;br /&gt;&lt;br /&gt;Q: What about applications built on the .NET Framework 2.0?&lt;br /&gt;A: The .NET Framework 2.0 is a proper subset of the .NET Framework 3.0 so applications are fully compatible.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-1712214068329854145?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/1712214068329854145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=1712214068329854145' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1712214068329854145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1712214068329854145'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2007/12/vs-2003-earlier-is-not-supported-in.html' title='VS 2003 &amp; earlier is not supported in Vista'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-4583947160903609493</id><published>2007-12-12T21:13:00.000+07:00</published><updated>2007-12-12T21:20:56.770+07:00</updated><title type='text'>Database Connection Problems</title><content type='html'>I have this error:&lt;br /&gt;&lt;br /&gt;System.ArgumentNullException: Value cannot be null.Parameter name: strat System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boolean copyPathList)at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String path)at System.Data.Common.ADP.GetVersionInfo(String filename)at System.Data.Odbc.OdbcGlobalEnv.GetGlobalEnv()at System.Data.Odbc.OdbcConnection.Open()at Tools.Login.DBLogin(String UserID, String Password, String fdbserver) in D:\xlink\workspace\XCardWeb\src\bin\Tools\Login.cs:line 34&lt;br /&gt;&lt;br /&gt;and spend a whole days to solve it and get no luck.&lt;br /&gt;&lt;br /&gt;reinstall .net is useless.&lt;br /&gt;&lt;br /&gt;finally after get the clue from this site:&lt;br /&gt;&lt;a href="http://www.jasonbock.net/JB/Default.aspx?blog=entry.b89f5611046d4555be2e39af9dd1448a"&gt;http://www.jasonbock.net/JB/Default.aspx?blog=entry.b89f5611046d4555be2e39af9dd1448a&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;it was caused by C:\Program Files\Common Files\System\Ole DB\oledb32.dll that some how unregistered from registry. Re-register it fix all of my problems.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-4583947160903609493?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/4583947160903609493/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=4583947160903609493' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/4583947160903609493'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/4583947160903609493'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2007/12/database-connection-problems.html' title='Database Connection Problems'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-767002482609814236</id><published>2007-07-30T16:42:00.000+07:00</published><updated>2007-07-30T20:12:44.016+07:00</updated><title type='text'>Application Framework</title><content type='html'>My original app framework consists of 7 layers. It much huh. It seem like OSI layers. First time I think it would be flexible, plug and play and easy to maintain. After several months, I look back to the framework and try to get to know how it worked. Somehow I get confuse. It is too complicated. Hmmm this is not good. I want a framework that when some day I got back to it I can see how it works as fast as I can.&lt;br /&gt;&lt;br /&gt;So, I have to redesign the framework. Maybe reducing layer could help. Practically in the real world most people separate applications into 3 popular layer: Data layer, Business Logic, and User Interface. However what we should put in those layers?&lt;br /&gt;&lt;br /&gt;My layers was: Data, Data Interface, Business Logic, Application Interface, Data Consumer, Data Interpreter, plus Browser. How to compress it into 3 layers? some of them should be merged.&lt;br /&gt;&lt;br /&gt;Data is very separated layer. It does not even the part of the applications. It some where else. There is no other choice. Data is first layer.&lt;br /&gt;&lt;br /&gt;Data Interface is responsible to translate request into queries. Well it can be part of Business Logic. So merge it.&lt;br /&gt;&lt;br /&gt;Business Logic is men in the middle. So it second layer.&lt;br /&gt;&lt;br /&gt;Application Interface is similar to data interface. It allow application business logic to communicate with others. It merged to Business Logic.&lt;br /&gt;&lt;br /&gt;Data Consumer. Is it UI layer or business logic. It construc and tell data interpreter how to display information from business logic. If I put it on UI then I will have it for each interpreter. This is not good. I want single data consumer for all UI. UI interpret and displayit using UI resource. Hmm, I think I will put it on Business Logic. Business Logic will handle how to display data and control which data is available.&lt;br /&gt;&lt;br /&gt;The last should be data interpreter that interpret data using their resources. It can use generic information structure or custom structure.&lt;br /&gt;&lt;br /&gt;Browser, I hate it but it must stay as top level UI when I use web application. So be it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-767002482609814236?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/767002482609814236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=767002482609814236' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/767002482609814236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/767002482609814236'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2007/07/application-framework.html' title='Application Framework'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-4784495773905398115</id><published>2007-06-29T19:47:00.000+07:00</published><updated>2007-06-29T19:48:33.954+07:00</updated><title type='text'>Result Set</title><content type='html'>Consideration&lt;br /&gt;-         Result set is consuming application resources, especially memories on both database server machine and client application.&lt;br /&gt;-         Mostly we need to handle small data but very often and many but some time we also need to handle large data&lt;br /&gt;-         Need to iterate result and retrieve secondary result based on the first result.&lt;br /&gt;&lt;br /&gt;Design&lt;br /&gt;-         Whenever possible use read only and forward only result set. This type of result set is very fast and does not lock record and it is supported by all database providers. Other type of result set such as scrollable and updatable not always supported by database providers.&lt;br /&gt;-         Copy result set data to list object (such as dataset) if number of records is relatively small (less than 1000 records) and close the result set connection as soon as possible.&lt;br /&gt;-         Other application components always use this collection object. For example if you need to iterate query result use list object.&lt;br /&gt;-         Note that if collection object consume large amount of memory then use result set directly but very carefully.&lt;br /&gt;&lt;br /&gt;public static Connection con;&lt;br /&gt;public static Statement stm = con.createStatement();&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;ResultSet rs1 = stm.execute(“select ...”);&lt;br /&gt;DataSet ds = new DataSet(rs1);&lt;br /&gt;&lt;br /&gt;for (int i=0; i &lt; ds.getCount(); i++){&lt;br /&gt;ResultSet rs2 = stm.execute(“select ...”);&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-4784495773905398115?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/4784495773905398115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=4784495773905398115' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/4784495773905398115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/4784495773905398115'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2007/06/result-set.html' title='Result Set'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-5963680341175969427</id><published>2007-06-28T19:37:00.000+07:00</published><updated>2007-06-28T19:42:28.812+07:00</updated><title type='text'>Queries</title><content type='html'>Consideration&lt;br /&gt;-         SQL depends on database provider.&lt;br /&gt;-         Different providers may have different SQL syntaxes&lt;br /&gt;-         Database transaction is several related-SQL that must all success or all fail.&lt;br /&gt;-         Many problems caused by SQL execution&lt;br /&gt;&lt;br /&gt;Design&lt;br /&gt;-         Encapsulate SQL execution with your own version of function. Executing SQL usually need several steps, like prepare, execute, and catch exception. Do not do this repeatedly, instead call a function that you can pass SQL and return object that contains error codes and result sets.&lt;br /&gt;-         If you use database transaction, call begin, commit, and rollback inside a function. Use the following formation:&lt;br /&gt;&lt;br /&gt;try&lt;br /&gt;    begin()&lt;br /&gt;    ...&lt;br /&gt;    ...&lt;br /&gt;    ...&lt;br /&gt;    commit()&lt;br /&gt;catch&lt;br /&gt;    rollback()&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;-         Always use try statements and check your result sets. If you encapsulate execute statements with your own version, you only need to do this at one place.&lt;br /&gt;-         Collect and localize SQL syntax in certain places. Do not scatter them across source codes. Bug fixed and enhancement can be easily done if we can locate quickly. In Java always put it under a special package.&lt;br /&gt;-         Place SQL for one provider in a set of files. Thus there are a set for Sybase, a set for Oracle, and so on. When connect to Sybase, it use only Sybase files and so for Oracle. Put shared SQL that can be used by many providers in General files.Maintain only one instance of SQL executor object (statement in Java or Command in .NET). Do not create it each time application execute SQL.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-5963680341175969427?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/5963680341175969427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=5963680341175969427' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5963680341175969427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/5963680341175969427'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2007/06/queries.html' title='Queries'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-4475010108403827028</id><published>2007-06-26T20:43:00.000+07:00</published><updated>2007-06-26T20:50:32.888+07:00</updated><title type='text'>Database Connection</title><content type='html'>Consideration&lt;br /&gt;-         Connecting to database is a slow process.&lt;br /&gt;-         Most application only need single connection to database&lt;br /&gt;-         DB server or network can disconnect their clients including your applications.&lt;br /&gt;&lt;br /&gt;Design&lt;br /&gt;-         Maintain only one instance of connection object. Do not create connection object each time access database.&lt;br /&gt;-         Put this connection object to a static or shared variable that can be accessed by all application modules and libraries.&lt;br /&gt;-         Create connection object after (not before) user supply user id and password. This may show login dialog quicker.&lt;br /&gt;-         Before accessing database, ensure that connection is not broken. Some application may allow automatic reconnect while others may not.&lt;br /&gt;-         If you can detect broken connection, do proper actions. For example show disconnected dialog and requires user to re-login.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-4475010108403827028?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/4475010108403827028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=4475010108403827028' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/4475010108403827028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/4475010108403827028'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2007/06/database-connection.html' title='Database Connection'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-3839591618558310123</id><published>2007-06-25T20:46:00.001+07:00</published><updated>2008-11-19T07:21:29.997+07:00</updated><title type='text'>Web Application - Submit Values in Form</title><content type='html'>&lt;div&gt;&lt;br /&gt;&lt;div&gt;See the following figure&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;img id="BLOGGER_PHOTO_ID_5079999359716613714" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_4-SW9bXomUw/Rn_IgK8e3lI/AAAAAAAAAAU/EQj4j93alH8/s400/web+request1.GIF" border="0" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;1. User request page to server&lt;br /&gt;2. Server reply with page content&lt;br /&gt;3. User enters value to fields. Step-3 not always trigger step-4 and step-5 but just go to step-6 or step-9&lt;br /&gt;4. Some field may cause browser to submit changes to server.&lt;br /&gt;5. Server (usually) replies with same page but may change some field values and properties. This can be enable/disable or show/hide fields that related to changed field&lt;br /&gt;6. Repeat step 3&lt;br /&gt;7. Repeat step 4&lt;br /&gt;8. Repeat step 5&lt;br /&gt;9. User finish with the form and submit it to server&lt;br /&gt;10. Server reply with page that notify whether submission is success or fail.&lt;br /&gt;&lt;br /&gt;In web application, step-3 to 5 and step-7 to 8 need special attention. Some web development technology may cause confusion in programming. This is due to synchronization between data in browser (client) and data preserved by server. The process become even more complicated when there are several fields that trigger submit changes.&lt;br /&gt;&lt;br /&gt;Image it like this. In form there are two related fields that are Profile and Name. At first time page loaded by default Profile set to “Simple” and field Name is disabled. User change profile to “Complex” and browser submit changes to server. Server replies and set Profile to “Complex” and enable field Name. It is getting weird when user clicks “Back” button of their browser, and change Profile to either “Simple” or “Complex”. When browser submits changes to server, data in both sides no longer match. Server thought data already change previously but browser still send old data.&lt;br /&gt;&lt;br /&gt;Some framework put old data in each reply and will be sent with submit changes and submit Form. Server does not save previous value in each request-reply. This solution has disadvantage in number of bytes that are sent to client. Page size is double compare to the first one. If the page size is large, network will be busy just to serve unnecessary or inefficient submit changes.&lt;br /&gt;&lt;br /&gt;Another better approach is by splitting page into several pages. In each page avoid submit changes of a fields to change other field properties. Submit all field values of each page when user clicks next and then display next page. Continue until user submits the last page. User may need to change value of previous page. To do this there must be back button. When user click back, open previous page and restore previous values. So, whenever user click back or next always save current page field values and restore next/previous page field values.&lt;br /&gt;&lt;br /&gt;Second alternative guide user for what they have to enter in the form, and also reduce network traffic. Request and reply data only sent when necessary. It may also reduce synchronization problems between browser and server. Hopefully by provide Back and Next button inside the page, user does not attempt to click Back button and Forward button of the browser.&lt;br /&gt;&lt;br /&gt;See the flow in picture below&lt;img id="BLOGGER_PHOTO_ID_5080000085566086754" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_4-SW9bXomUw/Rn_JKa8e3mI/AAAAAAAAAAc/S3b36nSU3JI/s400/web+request2.GIF" border="0" /&gt;It is similar to original one. However step-3 does not automatically trigger submit changes to server. New values are sent to server when user click Next or Back button (step-4). This new values may effect how next/previous page fields are displayed&lt;a href="http://2.bp.blogspot.com/_4-SW9bXomUw/Rn_IGq8e3kI/AAAAAAAAAAM/QJXdKe2ZG0U/s1600-h/web+request1.GIF"&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-3839591618558310123?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/3839591618558310123/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=3839591618558310123' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/3839591618558310123'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/3839591618558310123'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2007/06/web-application-submit-values-in-form.html' title='Web Application - Submit Values in Form'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_4-SW9bXomUw/Rn_IgK8e3lI/AAAAAAAAAAU/EQj4j93alH8/s72-c/web+request1.GIF' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4540594485530624092.post-1308591031314431061</id><published>2007-06-25T20:04:00.000+07:00</published><updated>2008-11-19T07:21:30.605+07:00</updated><title type='text'>Architectures</title><content type='html'>&lt;div align="left"&gt;&lt;strong&gt;Sub Systems&lt;/strong&gt;&lt;br /&gt;Define system using standard rules like graphic below &lt;/div&gt;&lt;br /&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;img id="BLOGGER_PHOTO_ID_5078858909644853394" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://3.bp.blogspot.com/_TyO1io7NBFk/Rnu7RPW1kJI/AAAAAAAAAAM/M7qtiJ9AYfU/s320/Subsystem.GIF" border="0" /&gt;Horizontal lines divide system by layer. Common layers are user interface, Business Logic and Data Access. Vertical lines divide system by its functionality. Blue arrows show dependency among sub system. By dividing system like this we already reduce system complexity into smaller sub system. In this case we have 12 small sub systems.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Dependency&lt;/strong&gt;&lt;br /&gt;System is consists of smaller sub-systems. There are dependencies between them. One object is called depend on other objects if it use other object. Project manager should keep this dependency low and avoid cyclic dependency. In object oriented design it called low coupling. Low coupling should be maintained from architecture level to programming level.&lt;br /&gt;&lt;br /&gt;In previous section, User interface depends to business logic. Business logic depends to data access. In functionality, Project depends to Customer, Developer, and Common. Customer and Developer depend to Common. Common does not depend to anything.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Measuring&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5078860494487785634" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_TyO1io7NBFk/Rnu8tfW1kKI/AAAAAAAAAAU/LXN0THVASwQ/s320/Dependency.GIF" border="0" /&gt;&lt;br /&gt;Each object is measure its dependency to other object including itself directly or indirectly. The top level object has 7 dependencies to other object. Middle objects have 3 dependencies and bottom objects only depend to it self.&lt;br /&gt;&lt;br /&gt;Total Dependency = 7 + 3 + 3 + 1 + 1 + 1+ 1 = 17&lt;br /&gt;Average Component Dependency = 17 / 7 Components = 2.43&lt;br /&gt;&lt;br /&gt;Compare with this one&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5078860863854973106" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://2.bp.blogspot.com/_TyO1io7NBFk/Rnu9C_W1kLI/AAAAAAAAAAc/SVo0kz61Xrk/s320/Less+Dependen.GIF" border="0" /&gt;&lt;br /&gt;Total Dependency = 3 + 1 + 1 + 2 + 2 + 2 + 2 + 2 = 13&lt;br /&gt;Average Component Dependency = 13 /7 = 1.86&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Cyclic Dependency&lt;/strong&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5078861254696997058" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_TyO1io7NBFk/Rnu9ZvW1kMI/AAAAAAAAAAk/cP1V0pADU_w/s320/Cyclic+Dependency.GIF" border="0" /&gt;&lt;br /&gt;Avoid cyclic dependency.&lt;br /&gt;Effects&lt;br /&gt;- Complex object reference – garbage collector&lt;br /&gt;- Inefficient object usage&lt;br /&gt;- More complex system&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Dependency Type&lt;/strong&gt;&lt;br /&gt;- Between Packages&lt;br /&gt;- Between Classes&lt;br /&gt;- Between Objects&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-size:100%;"&gt;&lt;strong&gt;Naming &lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;Naming convention can follow these rules:&lt;br /&gt;- Class package : company.project.functionality.subfunctionality.layer&lt;br /&gt;- A package should only be defined in one module.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4540594485530624092-1308591031314431061?l=nevaku.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://nevaku.blogspot.com/feeds/1308591031314431061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4540594485530624092&amp;postID=1308591031314431061' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1308591031314431061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4540594485530624092/posts/default/1308591031314431061'/><link rel='alternate' type='text/html' href='http://nevaku.blogspot.com/2007/06/architectures.html' title='Architectures'/><author><name>Neva ku</name><uri>http://www.blogger.com/profile/03096411787382433663</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://photos.friendster.com/photos/85/04/6524058/4585237616754l.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_TyO1io7NBFk/Rnu7RPW1kJI/AAAAAAAAAAM/M7qtiJ9AYfU/s72-c/Subsystem.GIF' height='72' width='72'/><thr:total>0</thr:total></entry></feed>
