<?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-1635617418074704618</id><updated>2012-01-30T20:08:11.582-08:00</updated><category term='PHP'/><category term='Blogging Tricks'/><category term='Book Review'/><category term='HTML and Javascript'/><category term='SQL And Database'/><category term='JSP'/><category term='Java'/><category term='Linux'/><category term='Web Services'/><title type='text'>Bogeyman's Blog</title><subtitle type='html'>Open Source, Programming, Tutorials, Tips, and Tricks.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-553838041311470529</id><published>2010-05-06T21:10:00.000-07:00</published><updated>2010-05-06T21:11:33.424-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Book Review'/><title type='text'>Book Review : Drupal e-commerce With Ubercart 2.x</title><content type='html'>&lt;p&gt;&lt;img src="http://web-alley.com/sites/default/files/book/drupal_ubercart_cover.jpg" style="float:left;margin-right:5px;" class="myshadowed" alt="drupal e-commerce with ubercart 2.x cover" /&gt;In March 2010, &lt;i&gt;&lt;a href="http://www.packtpub.com/" target="_blank"&gt;Packt Publishing&lt;/a&gt;&lt;/i&gt; published the first book about Ubercart which titled &lt;i&gt;Drupal e-commerce With Ubercart 2.x&lt;/i&gt;. The book that writen by &lt;i&gt;George Papadongonas&lt;/i&gt; and &lt;i&gt;Yiannis Doxaras&lt;/i&gt; is very interesting and has a complete explanation. This book explains Ubercart from the beginning, so anyone who has no experience in Ubercart can follow the explanation relatively easy. Generally, the explanation in this book consists of the installation of Drupal and Ubercart, managing store, and enhancing store functionality.&lt;/p&gt;
&lt;dl&gt;
    &lt;dt&gt;&lt;b&gt;The Beginning&lt;/b&gt;&lt;/dt&gt;
    &lt;dd&gt;
        &lt;p&gt;One of interesting things in this book is the final store is shown in the first chapter. This is a good way to start this book because the readers will have a "picture" in their mind about how the store will look like and what will they do to achieve it.&lt;/p&gt;
    &lt;/dd&gt;
    &lt;dt&gt;&lt;b&gt;Installation And Basic Configuration&lt;/b&gt;&lt;/dt&gt;
    &lt;dd&gt;
        &lt;p&gt;The installation and basic configuration of Drupal and Ubercart are written in two chapters (2 and 3). The explanation in this part includes installing the required and optional Drupal modules. Something need a special attention in here is the installation should be done in sequence, Drupal and the required modules first and then the Ubercart. If not there will be a problem like the undisplayed image field when creating product. Also there is no example in the later chapters about how to use &lt;i&gt;Content Creation Kit (CCK)&lt;/i&gt; and &lt;i&gt;ImageCache&lt;/i&gt; module to add image field for product manually.&lt;/p&gt;
    &lt;/dd&gt;
    &lt;dt&gt;&lt;b&gt;Store Management&lt;/b&gt;&lt;/dt&gt;
    &lt;dd&gt;
        &lt;p&gt;The store management part is writen in four chapters (4, 5, 6, and 7). The fundamental jobs like managing products, shipping, payment, customers, and orders are discussed here. These chapters are the most important part of this book and should be read thoroughly to gain a strong knowledge about managing the online store.&lt;/p&gt;
        &lt;p&gt;Some interesting topics which can be found in these chapters are:&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;Creating &lt;i&gt;product kit&lt;/i&gt; to bind two or more products as one package.&lt;/li&gt;
            &lt;li&gt;Importing products from textfile or CSV file to save your time when inserting a large number of products.&lt;/li&gt;
            &lt;li&gt;Adding &lt;i&gt;product attributes&lt;/i&gt; like color or memory size to let customers choose their preferred product variant.&lt;/li&gt;
            &lt;li&gt;Using &lt;i&gt;product classes&lt;/i&gt; for a more efficient product attributes management.&lt;/li&gt;
            &lt;li&gt;Managing the shipping quote using flat rate and also connecting your store with the transport companies like &lt;i&gt;UPS&lt;/i&gt; and &lt;i&gt;USPS&lt;/i&gt;.&lt;/li&gt;
            &lt;li&gt;Integrating payment method using different payment gateways like &lt;i&gt;Paypal&lt;/i&gt; and &lt;i&gt;Google Checkout&lt;/i&gt;.&lt;/li&gt;
            &lt;li&gt;There is also a brief explanation about installing &lt;i&gt;CiviCRM&lt;/i&gt;, Drupal module for CRM system.&lt;/li&gt;
        &lt;/ul&gt;
        &lt;p&gt;Something did not appear in this part is the explanation about testing the payment system using the &lt;i&gt;Paypal Sandbox&lt;/i&gt; which is very important when the site is still under development. There is also no explanation about using &lt;i&gt;Paypal Website Payment Standard&lt;/i&gt; for the payment method. The discussed method is just the &lt;i&gt;Paypal Website Payment Pro&lt;/i&gt; that only usefull for people who live in United States.&lt;/p&gt;
    &lt;/dd&gt;
    &lt;dt&gt;&lt;b&gt;Enhancing Store Functionality&lt;/b&gt;&lt;/dt&gt;
    &lt;dd&gt;
        &lt;p&gt;This part consists of three chapters (8, 9, and 10) and it will explain how to enhance the look and feel and functionality of our store. In these chapters, we will learn how to make our store more attractive and user friendly so the visitor will keep coming to our store. Not only the human visitor, but also search engine.&lt;/p&gt;
        &lt;p&gt;The interesting topics which can be found in these chapters are:&lt;/p&gt;
        &lt;ul&gt;
            &lt;li&gt;A very good theme design tutorial. We will learn how to use and customize the available Drupal theme, building theme based on &lt;i&gt;Zen&lt;/i&gt;, creating theme from a pure HTML theme, and also creating theme from &lt;i&gt;Photoshop&lt;/i&gt; template.&lt;/li&gt;
            &lt;li&gt;Using &lt;i&gt;product cross-selling&lt;/i&gt; to give suggestion or recommendation to customers about certain products.&lt;/li&gt;
            &lt;li&gt;Improving the shopping cart by using the pictured shopping cart and AJAX shopping cart.&lt;/li&gt;
            &lt;li&gt;Adding the discount to the products.&lt;/li&gt;
            &lt;li&gt;Giving the different price the products according to country or user role.&lt;/li&gt;
            &lt;li&gt;&lt;i&gt;Search Engine Optimization (SEO)&lt;/i&gt; tips. We will learn how to make our store more search engine friendly by using Drupal modules like &lt;i&gt;Pathauto&lt;/i&gt;, &lt;i&gt;Global Redirect&lt;/i&gt;, &lt;i&gt;Meta Tags&lt;/i&gt;, &lt;i&gt;XML Sitemap&lt;/i&gt;, etc..&lt;/li&gt;
        &lt;/ul&gt;
        &lt;p&gt;There is also something you have to read in the appendix chapter. It is an example about using &lt;i&gt;Hotel Booking System&lt;/i&gt; for Ubercart. This is also a great thing we can do with Ubercart.&lt;/p&gt;
    &lt;/dd&gt;
    &lt;dt&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;/dt&gt;
    &lt;dd&gt;
        &lt;p&gt;Overall, this book is really great and has the detailed explanations and examples. This book is very recommended for the people who want to build an e-commerce website using Drupal and Ubercart. The complete explanation inside it can guide the readers to build an e-commerce website that not only has a strong foundation but also expandable.&lt;/p&gt;
        &lt;p&gt;Anyway, some cases like Drupal installation, configuration, installing modules are very large topics and they are enough to be writen in separated book. The explanations on those topics are very compact. Therefore user's experience and basic skill in using Drupal is required.&lt;/p&gt;
        &lt;p&gt;The detail information about this book can be seen &lt;a href="http://www.packtpub.com/drupal-e-commerce-with-ubercart-2-x/book" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
    &lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-553838041311470529?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/553838041311470529/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=553838041311470529' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/553838041311470529'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/553838041311470529'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2010/05/book-review-drupal-e-commerce-with.html' title='Book Review : Drupal e-commerce With Ubercart 2.x'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-6896210104656297225</id><published>2010-04-04T19:46:00.000-07:00</published><updated>2010-04-05T17:23:54.163-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Book Review'/><title type='text'>Book Review : iReport 3.7</title><content type='html'>&lt;p&gt;&lt;img src="http://web-alley.com/sites/default/files/book/ireport_cover.jpg" style="float:left;margin-right:5px;" alt="ireport 3.7 cover"&gt;This is a review of book titled &lt;i&gt;iReport 3.7&lt;/i&gt; written by &lt;i&gt;Shamsuddin Ahammad&lt;/i&gt; and published by &lt;i&gt;&lt;a href="http://www.packtpub.com/" target="_blank"&gt;Packt Publishing&lt;/a&gt;&lt;/i&gt;. This book tells us about designing and producing report for Java application with iReport 3.7. Shamsuddin Ahammad writes this book with a very clear step-by-step visual explanation which makes this book is very nice to read and easy to understand. Reading this book while practising the examples in the computer is very recommended because the screenshots in this book are really helpfull so we wouldn't get 'lost' while exploring the 'crowded' interface of iReport Designer.&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;From Chapter To Chapter&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;
    &lt;p&gt;Now, let's see what will we learn from each chapter.&lt;/p&gt;
    &lt;ul&gt;
        &lt;li&gt;&lt;p&gt;The first chapter will introduce us about iReport especially for someone that never heard about it before. This chapter tells us about what is iReport, what it used for, and also the main interface and features of it.&lt;/p&gt;&lt;/li&gt;
        &lt;li&gt;
            &lt;p&gt;In chapter 2 until 10 we will explore and learn deeper about using iReport Designer for creating the report. These chapters are the most important part of this book. Reading these chapters thoroughly can give us a strong basic and skill in using iReport Designer.&lt;/p&gt;
   &lt;p&gt;There are so many interesting techniques in these chapters which can be applied while we creating the report such as:
                &lt;ul&gt;
                    &lt;li&gt;Using one or more parameters to produce the dynamic report.&lt;/li&gt;
                    &lt;li&gt;Grouping the report data which can make the report provides clearer information.&lt;/li&gt;
                    &lt;li&gt;Working with subreport to create a report with a master-detail relation.&lt;/li&gt;
                    &lt;li&gt;Working with chart so the report can be displayed in visual shape and easier to read.&lt;/li&gt;
                    &lt;li&gt;Displaying images in the report so the report will not only display text as the information but also the images.&lt;/li&gt;
                &lt;/ul&gt;
            &lt;/p&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;p&gt;The last two chapters, 11 and 12, might be the chapters which most Java developers look for. We all know that the report can't stand alone by itself because it needs the other application to run. Because of that, this book also explains about how to call the report from Java desktop application. Although there is no detail example or sample application about how to call the report from web application like JSP, the method to do that, by exporting the report to HTML or PDF document, is still discussed here. Besides that, we will also learn how to install iReport Designer plugin in Netbeans IDE. By doing this, we can design the report inside the Netbeans IDE. This is important for Java developers because the application development process can become more convenient.&lt;/p&gt;
        &lt;/li&gt;
        &lt;li&gt;
            &lt;p&gt;The Appendix chapter of this book is about the sample database which is used by all examples in this book. The sample database given here is also a good example for sample cases because we can practise to create the report from a simple one to a complex one based on that database. This chapter also explains how to use MySQL GUI tools for the basic MySQL database administration like creating database and also backing up and restoring the database. &lt;/p&gt;
        &lt;/li&gt;
    &lt;/ul&gt;
&lt;dt&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;
    &lt;p&gt;This book will be a very good guidance for iReport beginners and also Java developers who want to learn about iReport and build Java application that needs a reporting feature. All explanations and examples in this book can give the readers strong basic and skill in using iReport and integrating the report with the Java applications.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;b&gt;More Detail Information&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;
    &lt;p&gt;The detail information of this book can be found &lt;a href="http://www.packtpub.com/ireport-3-7/book?utm_source=bogeyman2007.blogspot.com&amp;utm_medium=bookrev&amp;utm_content=blog&amp;utm_campaign=mdb_002863" target="_blank"&gt;here&lt;/a&gt;.&lt;/p&gt;
    &lt;p&gt;And, the sample chapter about "&lt;a href="http://www.packtpub.com/files/8808-iReport-3-7-sample-chapter-report-layout-and-formatting.pdf" target="_blank"&gt;Report Layout And Formatting&lt;/a&gt;" is available for download at &lt;i&gt;Packt Publishing&lt;/i&gt; website.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-6896210104656297225?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/6896210104656297225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=6896210104656297225' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/6896210104656297225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/6896210104656297225'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2010/04/book-review-ireport-37.html' title='Book Review : iReport 3.7'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-3355226239425321543</id><published>2009-05-03T19:19:00.000-07:00</published><updated>2009-05-03T19:26:48.759-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Blogging Tricks'/><title type='text'>How To Know The Popular Pages In Your Blog</title><content type='html'>&lt;p&gt;In my previous tutorial about blogging tricks, I have writen about adding &lt;b&gt;Google Page Rank&lt;/b&gt;, &lt;b&gt;Traffic Map&lt;/b&gt;, and &lt;b&gt;Visitor Counter&lt;/b&gt; to our blog. But, maybe there is something else that we need to know. We might want to know what pages or articles which have a good popularity rank in our blog. This is a good information to trace what our visitors like to read from our blog.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Get The Code&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Where can we get this tool? Once again, the site &lt;a href="http://feedjit.com/joinjs"&gt;http://feedjit.com/joinjs&lt;/a&gt; saves our life. So, open that site and find the part of that site says &lt;b&gt;Page Popularity&lt;/b&gt;. Then, copy the HTML code.&lt;/p&gt;
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/Sf5Q-xcvsRI/AAAAAAAAAKo/FnTrMsJs6ag/s1600-h/Feedjit-PagePopularity.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 261px; height: 396px;" src="http://3.bp.blogspot.com/_FUeZc98mol8/Sf5Q-xcvsRI/AAAAAAAAAKo/FnTrMsJs6ag/s400/Feedjit-PagePopularity.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5331788048209260818" /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Paste It&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Log in to blogger. In your blogger dashboard, click &lt;b&gt;Layout&lt;/b&gt; then click the &lt;b&gt;Add Widget&lt;/b&gt; link and the popup window will appear. Choose &lt;b&gt;HTML/Javascript&lt;/b&gt; option then another popup windows will be shown. Give the title for it like &lt;i&gt;Popular Pages&lt;/i&gt; or something else. Then, paste the HTML code and click &lt;b&gt;Save&lt;/b&gt; when you're done.&lt;/p&gt;
&lt;p&gt;The detail of these process is the same like my previous tutorial about &lt;a href="http://bogeyman2007.blogspot.com/2009/01/adding-visitor-counter-to-your-blog.html"&gt;adding visitor counter&lt;/a&gt;.&lt;/p&gt;
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/Sf5Q-91jm2I/AAAAAAAAAKw/b2dpbAZCfCU/s1600-h/Blogger-Paste4.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 339px; height: 400px;" src="http://3.bp.blogspot.com/_FUeZc98mol8/Sf5Q-91jm2I/AAAAAAAAAKw/b2dpbAZCfCU/s400/Blogger-Paste4.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5331788051534551906" /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Place It Nicely&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Place it by dragging and dropping it to your desireable place. Click &lt;b&gt;Save&lt;/b&gt; if you feel satisfy with the result.&lt;/p&gt;
&lt;p&gt;The detail of these process is still the same like my tutorial about &lt;a href="http://bogeyman2007.blogspot.com/2009/01/adding-visitor-counter-to-your-blog.html"&gt;adding visitor counter&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;See The Result&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Now, open your blog. The &lt;b&gt;Page Popularity&lt;/b&gt; will be looked like this.&lt;/p&gt;
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FUeZc98mol8/Sf5Q_Wlvz-I/AAAAAAAAAK4/Fywkwu2PH2I/s1600-h/Blogger-PopularPages.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 285px; height: 330px;" src="http://1.bp.blogspot.com/_FUeZc98mol8/Sf5Q_Wlvz-I/AAAAAAAAAK4/Fywkwu2PH2I/s400/Blogger-PopularPages.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5331788058179129314" /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-3355226239425321543?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/3355226239425321543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=3355226239425321543' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/3355226239425321543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/3355226239425321543'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2009/05/how-to-know-popular-pages-in-your-blog.html' title='How To Know The Popular Pages In Your Blog'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_FUeZc98mol8/Sf5Q-xcvsRI/AAAAAAAAAKo/FnTrMsJs6ag/s72-c/Feedjit-PagePopularity.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-5874516708870968787</id><published>2009-04-23T02:29:00.001-07:00</published><updated>2009-04-23T17:21:59.238-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='HTML and Javascript'/><title type='text'>Formatting HTML Table Rows With Javascript</title><content type='html'>&lt;p&gt;If we are working with PHP we can easily formatting even and odd table row's color with looping. But, what if we are working with the pure HTML table? Can we format even and odd row with different color without typing it manually inside the &lt;b&gt;&amp;lt;tr&amp;gt;&lt;/b&gt; tag? Yes, we can. Just use Javascript to do that job.&lt;/p&gt;
&lt;p&gt;The basic concept is we must loop through the all of the rows of an HTML table that we want to format and then add the &lt;b&gt;class&lt;/b&gt; attribute for each row. That class attribute will contain the name of &lt;b&gt;CSS class&lt;/b&gt; for an even or odd row.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Sample Code&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;This the sample code.&lt;/p&gt;
&lt;div style="width:550px;height:300px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;Table&amp;lt;/title&amp;gt;
    &amp;lt;style type="text/css"&amp;gt;
        &lt;b&gt;/* DEFINE THE CSS CLASSES */
        .table_header{
            background-color:#AAAAAA;
            color:#FFFFFF
        }
        
        .even{
            background-color:#DDDDDD;
        }
        
        .odd{
            background-color:#EEEEEE;
        }
        
        #table1{
            background-color:#777777;
        }&lt;/b&gt;
    &amp;lt;/style&amp;gt;
    &amp;lt;script language="javascript" type="text/javascript"&amp;gt;
        &lt;b&gt;/* THIS IS THE FUNCTION FOR FORMATTING ROW */
        function formatRow(table_id){
            var table=document.getElementById(table_id);
            for(var i=1;i&amp;lt;table.rows.length;i++){
                var className="";
                if(i%2==0){
                    className="even";
                }
                else{
                    className="odd";
                }
                
                table.getElementsByTagName("tr")[i].className=className;
            }
        }&lt;/b&gt;
    &amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;table width="300" id="table1" border="0" cellspacing="1"&amp;gt;
        &amp;lt;tr class="table_header"&amp;gt;&amp;lt;th&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
        &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
    &amp;lt;/table&amp;gt;
    &amp;lt;script language="javascript"&amp;gt;
        &lt;b&gt;/* FORMAT THE TABLE */
        formatRow("table1");&lt;/b&gt;
    &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;How Does It Look Like?&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/SfA1IGNQmWI/AAAAAAAAAIQ/Irfktib7rAY/s1600-h/table-javascript.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 399px;" src="http://3.bp.blogspot.com/_FUeZc98mol8/SfA1IGNQmWI/AAAAAAAAAIQ/Irfktib7rAY/s400/table-javascript.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5327816772400748898" /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-5874516708870968787?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/5874516708870968787/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=5874516708870968787' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/5874516708870968787'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/5874516708870968787'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2009/04/formatting-html-table-rows-with.html' title='Formatting HTML Table Rows With Javascript'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_FUeZc98mol8/SfA1IGNQmWI/AAAAAAAAAIQ/Irfktib7rAY/s72-c/table-javascript.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-9128163807596659790</id><published>2009-04-12T17:19:00.000-07:00</published><updated>2009-06-21T17:15:13.615-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Detecting IP Address Behind The Proxy</title><content type='html'>&lt;p&gt;This is the short tutorial for detecting the IP address of website's visitors. If you familiar with PHP, you can use the &lt;span style="font-family:monospace;font-weight:bold"&gt;$_SERVER['REMOTE_ADDR']&lt;/span&gt; superglobal variable to detect the visitor's IP address. What if the visitor is browsing from behind the proxy. Of course you will only get the proxy IP address not the real IP address of the visitor.&lt;/p&gt;
&lt;p&gt;There is one more superglobal variable to detect the real IP address of the visitor. It is the &lt;span style="font-family:monospace;font-weight:bold"&gt;$_SERVER['HTTP_X_FORWARDED_FOR']&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;This simple program will demonstrate the detection of IP address and the IP address that "hidding" behind the proxy.&lt;/p&gt;
&lt;div style="width:550px;height:200px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
&amp;lt;?php
echo "&amp;lt;p&amp;gt;You came from &amp;lt;b&amp;gt;".$_SERVER['REMOTE_ADDR']."&amp;lt;/b&amp;gt;.&amp;lt;/p&amp;gt;";

if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {
  if (preg_match("/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i", $_SERVER['HTTP_X_FORWARDED_FOR'])) {
    echo "But, your real IP address is &amp;lt;b&amp;gt;".$_SERVER['HTTP_X_FORWARDED_FOR']."&amp;lt;/b&amp;gt;.";
  }
  else{
    echo "But, your real IP address is unknown.";
  }
}
?&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;This is the screenshot while the script was running.&lt;/p&gt;
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/SeKF78ErZzI/AAAAAAAAAHU/3qOFl_TAbKU/s1600-h/detect_ip.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 251px;" src="http://3.bp.blogspot.com/_FUeZc98mol8/SeKF78ErZzI/AAAAAAAAAHU/3qOFl_TAbKU/s400/detect_ip.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5323964974289872690" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-9128163807596659790?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/9128163807596659790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=9128163807596659790' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/9128163807596659790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/9128163807596659790'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2009/04/detecting-ip-address-behind-proxy.html' title='Detecting IP Address Behind The Proxy'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_FUeZc98mol8/SeKF78ErZzI/AAAAAAAAAHU/3qOFl_TAbKU/s72-c/detect_ip.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-4424584012978619763</id><published>2009-04-06T17:22:00.001-07:00</published><updated>2009-04-07T17:35:17.339-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Services'/><title type='text'>Creating The Web Services Client (Part 3)</title><content type='html'>&lt;p&gt;We have created the desktop and web applications as the clients of web service. There one more application that we are going to create. The mobile application. This mobile application is based on Java (J2ME).&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;The Code&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;You need a supporting library to make your job easier. In this tutorial, I will use the &lt;b&gt;Wingfoot SOAP&lt;/b&gt; or &lt;b&gt;WSOAP&lt;/b&gt; as the supporting library. You can download &lt;b&gt;WSOAP&lt;/b&gt; from &lt;a href="http://www.sourceforge.net"&gt;www.sourceforge.net&lt;/a&gt;. The other SOAP implementation for mobile application is KSOAP.&lt;/p&gt;
&lt;p&gt;WSOAP came in zipped file. Inside the zip file there are two essential files such as &lt;b&gt;kvmwsoap_1.06.jar&lt;/b&gt; and &lt;b&gt;j2sewsoap_1.06.jar&lt;/b&gt;. The one that we are going to use is the first one. So, copy the &lt;b&gt;kvmwsoap_1.06.jar&lt;/b&gt; file to the &lt;b&gt;lib&lt;/b&gt; folder inside your J2ME project folder.&lt;/p&gt;
&lt;div style="width:550px;height:300px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import com.wingfoot.soap.*;
import com.wingfoot.soap.encoding.*;
import com.wingfoot.soap.transport.*;

public class wsclient extends MIDlet implements CommandListener,Runnable{
    private Form form;
    private TextField txtName;
    private StringItem strResult;
    private Command cmdOk;
    private Command cmdExit;
    private Display display;
    
    public wsclient(){
        form=new Form("Web Service Client");
        txtName=new TextField("Name","",10,TextField.ANY);
        strResult=new StringItem("","");
        cmdOk=new Command("Ok",Command.OK,1);
        cmdExit=new Command("Exit",Command.EXIT,2);
        
        form.append(txtName);
        form.append(strResult);
        
        form.addCommand(cmdOk);
        form.addCommand(cmdExit);
        form.setCommandListener(this);
    }
    
    public void startApp(){
        display=Display.getDisplay(this);
        display.setCurrent(form); 
    }
    
    public void pauseApp(){
    }
    
    public void destroyApp(boolean unc){
    }
    
    public void commandAction(Command c, Displayable d){
        if(c==cmdOk){
            new Thread(this).start();
        }
        if(c==cmdExit){
            destroyApp(false);
            notifyDestroyed();
        }
    }
    
    public void run(){
        try{
            &lt;i&gt;// THE LOCATION OF WEB SERVICES&lt;/i&gt;
            String url="http://localhost:8080/axis/services";
            
            Call c=new Call();
            
            &lt;i&gt;// SET THE THE METHOD NAME, SERVICE NAME, AND THE INPUT PARAMETER&lt;/i&gt;
            c.setMethodName("greeting");
            c.setTargetObjectURI("helloService");
            c.addParameter("name",txtName.getString());
            
            HTTPTransport transport=new HTTPTransport(url,null);
            transport.getResponse(true);
            
            &lt;i&gt;// CALL THE WEB SERVICE&lt;/i&gt;
            Envelope res=c.invoke(transport);
            
            strResult.setText("Response : " + String.valueOf(res.getParameter(0)));
        }
        catch(Exception ex){
            strResult.setText(ex.toString());
        }
    }
}
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;Save this file with name &lt;b&gt;wsclient.java&lt;/b&gt; under the &lt;b&gt;src&lt;/b&gt; folder of your project.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Build and Run It!&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Build your application and run it. This is the screenshot of this application while running.&lt;/p&gt;
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FUeZc98mol8/Sdqc5b6K42I/AAAAAAAAAGs/jxFeudsZcnE/s1600-h/client3.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 180px; height: 209px;" src="http://4.bp.blogspot.com/_FUeZc98mol8/Sdqc5b6K42I/AAAAAAAAAGs/jxFeudsZcnE/s400/client3.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5321738420249879394" /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-4424584012978619763?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/4424584012978619763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=4424584012978619763' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/4424584012978619763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/4424584012978619763'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2009/04/creating-web-services-client-part-3.html' title='Creating The Web Services Client (Part 3)'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_FUeZc98mol8/Sdqc5b6K42I/AAAAAAAAAGs/jxFeudsZcnE/s72-c/client3.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-3544938726065170537</id><published>2009-03-31T17:33:00.001-07:00</published><updated>2009-04-01T17:27:46.732-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Services'/><title type='text'>Creating The Web Services Client (Part 2)</title><content type='html'>&lt;p&gt;The web services can be accessed by anykind of applications such as desktop application, web application, even mobile application. In the previous tutorial, we have learnt how to create a desktop application to access the web service. Now, we are going to create a web application with PHP to access that web service.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;The Code&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;This is the PHP script. But, there is a requirement before you can run this script. You need a supporting library named &lt;b&gt;NuSOAP&lt;/b&gt;. You can find it from &lt;a href="http://www.sourceforge.net"&gt;www.sourceforge.net&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;NuSOAP came in a zipped file. So, unzip it and copy the &lt;b&gt;nusoap.php&lt;/b&gt; file to the same location with this script so it can be included with this script.&lt;/p&gt;
&lt;div style="width:550px;height:300px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
&amp;lt;html&amp;gt;
    &amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Web Service Client&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
    &amp;lt;form action="&amp;lt;?= $_SERVER['PHP_SELF'] ?&amp;gt;" method="post"&amp;gt;
        &amp;lt;input type="text" name="name"&amp;gt;&amp;lt;input type="submit" name="submit" value="SUBMIT"&amp;gt;
    &amp;lt;/form&amp;gt;
    &amp;lt;div id="result" style="font-weight:bold;"&amp;gt;
    &amp;lt;?php
    if($_POST['submit']){
        include("nusoap.php");
        
        &lt;i&gt;// THE LOCATION OF WEB SERVICES&lt;/i&gt;
        $client=new soap_client("http://localhost:8080/axis/services");
        
        &lt;i&gt;// CALL THE WEB SERVICE WITH THE METHOD NAME, INPUT PARAMETER, AND SERVICE NAME&lt;/i&gt;
        $result = $client-&amp;gt;call('greeting', array("name" =&amp;gt; $_POST['name']), 'helloService');
        if($client-&amp;gt;getError()){
            echo $client-&amp;gt;getError();
        }
        else{
            echo $result;
        }
    }
    ?&amp;gt;
    &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Run It!&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;This is the screenshot of this application while running.&lt;/p&gt;
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FUeZc98mol8/SdK1z-BJdzI/AAAAAAAAAGk/uJm2-6iZj5g/s1600-h/client2.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 249px;" src="http://1.bp.blogspot.com/_FUeZc98mol8/SdK1z-BJdzI/AAAAAAAAAGk/uJm2-6iZj5g/s400/client2.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5319514014303745842" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-3544938726065170537?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/3544938726065170537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=3544938726065170537' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/3544938726065170537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/3544938726065170537'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2009/03/creating-web-services-client-part-2_31.html' title='Creating The Web Services Client (Part 2)'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_FUeZc98mol8/SdK1z-BJdzI/AAAAAAAAAGk/uJm2-6iZj5g/s72-c/client2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-3625186515916259410</id><published>2009-03-16T17:21:00.000-07:00</published><updated>2009-03-16T17:24:20.758-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Services'/><title type='text'>Creating The Web Services Client (Part 1)</title><content type='html'>&lt;p&gt;In the previous tutorial, we've learnt how to create a simple web service with Apache Axis. Now, we're going to learn how to create a simple client application to access that web service. This application is a simple desktop application made with Java programming language.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;The Code&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;This is the source code of this application. Save this file with name &lt;b&gt;helloClient.java&lt;/b&gt;&lt;/p&gt;
&lt;div style="width:550px;height:300px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
import org.apache.axis.AxisFault;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;
import org.apache.axis.encoding.XMLType;
import javax.xml.rpc.ParameterMode;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class helloClient extends JFrame implements ActionListener{
    private JButton btnSend;
    private JTextField txtParameter;
    
    public void initComponent(){
        btnSend=new JButton("SEND");
        btnSend.setMnemonic('S');
        btnSend.addActionListener(this);
        txtParameter=new JTextField(10);
    }
    
    public void design(){
        setTitle("Web Service Client");
        getContentPane().setLayout(new FlowLayout());
        getContentPane().add(txtParameter);
        getContentPane().add(btnSend);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        pack();
        setVisible(true);
    }
    
    private String sendRequest(String name) throws Exception{
        Service  service = new Service();
        Call call = (Call)service.createCall();
        String result;
        
        &lt;i&gt;// SET THE LOCATION OF WEB SERVICE&lt;/i&gt;
        String endpoint = "http://localhost:8080/axis/services";
        call.setTargetEndpointAddress( new java.net.URL(endpoint));

        &lt;i&gt;// SET THE SERVICE NAME AND THE METHOD TO BE CALLED&lt;/i&gt;
        call.setOperationName(new QName("helloService", "greeting"));
        
        &lt;i&gt;// ADD THE INPUT PARAMETER&lt;/i&gt;
        call.addParameter( "name", XMLType.XSD_STRING, ParameterMode.IN );
        
        &lt;i&gt;// SEND REQUEST TO WEB SERVICE&lt;/i&gt;
        String response = (String) call.invoke(new Object[]{name});

        return response;
    }
    
    helloClient(){
        initComponent();
        design();
    }
    
    public static void main(String [] args){
        new helloClient();
    }

    public void actionPerformed(ActionEvent ae){
        if(ae.getSource()==btnSend){
            try{
                JOptionPane.showMessageDialog(this,sendRequest(txtParameter.getText()), "Response", JOptionPane.INFORMATION_MESSAGE);
            }
            catch(Exception ex){
                JOptionPane.showMessageDialog(this,"Error : " + ex.toString(), "Error", JOptionPane.ERROR_MESSAGE);
            }
        }
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Compile&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;This application needs some Axis' libraries. So, don't forget to set the required environment variables. I have write about this in the previous tutorial. After that, compile the &lt;b&gt;helloClient.java&lt;/b&gt; file with this command.&lt;/p&gt;
&lt;div style="width:550px;height:50px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
javac -classpath %AXISCLASSPATH% helloClient.java
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Run&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;If your compilation process didn't output any error, you can run this application with this command.&lt;/p&gt;
&lt;div style="width:550px;height:50px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
java -classpath .;%AXISCLASSPATH% helloClient
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;This is the screenshot of this application.&lt;/p&gt;
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/Sb7tbjjMLuI/AAAAAAAAAGc/fbotfe-uck4/s1600-h/client1.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 327px; height: 206px;" src="http://3.bp.blogspot.com/_FUeZc98mol8/Sb7tbjjMLuI/AAAAAAAAAGc/fbotfe-uck4/s400/client1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5313945667998854882" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-3625186515916259410?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/3625186515916259410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=3625186515916259410' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/3625186515916259410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/3625186515916259410'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2009/03/creating-web-services-client-part-1.html' title='Creating The Web Services Client (Part 1)'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_FUeZc98mol8/Sb7tbjjMLuI/AAAAAAAAAGc/fbotfe-uck4/s72-c/client1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-8644025949383902042</id><published>2009-03-09T21:46:00.000-07:00</published><updated>2009-03-10T17:19:51.267-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Services'/><title type='text'>Creating Web Services With Apache Axis</title><content type='html'>&lt;p&gt;&lt;b&gt;&lt;u&gt;The Environment Variables&lt;/b&gt;&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;Before you start, you have to set up some environment variables. You can set them from &lt;i&gt;Windows System Properties&lt;/i&gt; or using the &lt;b&gt;MS-DOS batch file (.bat)&lt;/b&gt;like this.&lt;/p&gt;
&lt;div style="width:550px;height:85px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
set AXIS_HOME=C:\apache-tomcat\webapps\axis\WEB-INF
set AXIS_LIB=%AXIS_HOME%\lib
set AXISCLASSPATH=%AXIS_LIB%\axis.jar;%AXIS_LIB%\commons-discovery-0.2.jar;%AXIS_LIB%\commons-logging-1.0.4.jar;%AXIS_LIB%\jaxrpc.jar;%AXIS_LIB%\log4j-1.2.8.jar;%AXIS_LIB%\saaj.jar;%AXIS_LIB%\wsdl4j-1.5.1.jar;%AXIS_LIB%\activation.jar;%AXIS_LIB%\mail.jar;%AXIS_LIB%\xmlsec.jar
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;If you are using Linux, you can use the following &lt;b&gt;executable shell script (.sh)&lt;/b&gt; to set those environment variables.&lt;/p&gt;
&lt;div style="width:550px;height:100px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
#!/bin/sh
AXIS_HOME="/usr/local/apache-tomcat/webapps/axis/WEB-INF"; export AXIS_HOME;
AXIS_LIB="$AXIS_HOME/lib"; export AXIS_LIB;
AXISCLASSPATH="$AXIS_LIB/axis.jar:$AXIS_LIB/commons-discovery-0.2.jar:$AXIS_LIB/commons-logging-1.0.4.jar:$AXIS_LIB/jaxrpc.jar:$AXIS_LIB/log4j-1.2.8.jar:$AXIS_LIB/saaj.jar:$AXIS_LIB/wsdl4j-1.5.1.jar:$AXIS_LIB/activation.jar:$AXIS_LIB/mail.jar:$AXIS_LIB/xmlsec.jar"; export AXISCLASSPATH;
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;The Web Service&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;To create a web service with Apache Axis, you have to put all your code under &lt;b&gt;webapps/axis/WEB-INF/classes&lt;/b&gt; folder. To make your project seems more organize, you can create one folder for each project. In this example I will create a folder named &lt;b&gt;hello&lt;/b&gt; to store my files. And, this is the source code of &lt;b&gt;helloService.java&lt;/b&gt;.&lt;/p&gt;
&lt;div style="width:550px;height:100px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
package &lt;b&gt;hello&lt;/b&gt;;

public class &lt;b&gt;helloService&lt;/b&gt;{
    public static String greeting(String name){
        return "Hello, " + name + "!";
    }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;Compile it with this command.&lt;/p&gt;
&lt;div style="width:550px;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
javac helloService.java
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Deploying Web Service&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;After compiling your web service, you need to deploy it. Before deploying it, you need to create a file called &lt;b&gt;deploy.wsdd&lt;/b&gt;.&lt;/p&gt;
&lt;div style="width:550px;height:100px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
&amp;lt;deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"&amp;gt;
    &amp;lt;service name=&lt;b&gt;"helloService"&lt;/b&gt; provider="java:RPC"&amp;gt;
        &amp;lt;parameter name="className" value=&lt;b&gt;"hello.helloService"&lt;/b&gt;/&amp;gt;
        &amp;lt;parameter name="allowedMethods" value="*"/&amp;gt;
    &amp;lt;/service&amp;gt;
&amp;lt;/deployment&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;Now, you can deploy it with this command (Don't forget to set the required environment variables before deploying it).&lt;/p&gt;
&lt;div style="width:550px;height:50px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
java -classpath %AXISCLASSPATH% org.apache.axis.client.AdminClient deploy.wsdd
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;Or with this command if you are using Linux.&lt;/p&gt;
&lt;div style="width:550px;height:50px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
java -classpath $AXISCLASSPATH org.apache.axis.client.AdminClient deploy.wsdd
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;Open the address &lt;b&gt;http://localhost:8080/axis/services/helloService?wsdl&lt;/b&gt; with your web browser. This is the WSDL document of your &lt;b&gt;helloService&lt;/b&gt; web service. If you see this, it means you have succesfully created your web service with Apache Axis.&lt;/p&gt;
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/SbXxEw6caPI/AAAAAAAAAGU/D39shx-0cCo/s1600-h/wsdl.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 289px;" src="http://3.bp.blogspot.com/_FUeZc98mol8/SbXxEw6caPI/AAAAAAAAAGU/D39shx-0cCo/s400/wsdl.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5311416399705172210" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Undeploying Web Service&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;To undeploy your web service, you have to create a file named &lt;b&gt;undeploy.wsdd&lt;/b&gt;.&lt;/p&gt;
&lt;div style="width:550px;height:100px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
&amp;lt;undeployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"&amp;gt;
    &amp;lt;service name=&lt;b&gt;"helloService"&lt;/b&gt; /&amp;gt;
&amp;lt;/undeployment&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;Undeploy it with this command (Once again, don't forget to set the required environment variables before undeploying it).&lt;/p&gt;
&lt;div style="width:550px;height:50px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
java -classpath %AXISCLASSPATH% org.apache.axis.client.AdminClient undeploy.wsdd
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;Or with this command if you are using Linux.&lt;/p&gt;
&lt;div style="width:550px;height:50px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
java -classpath $AXISCLASSPATH org.apache.axis.client.AdminClient undeploy.wsdd
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-8644025949383902042?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/8644025949383902042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=8644025949383902042' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/8644025949383902042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/8644025949383902042'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2009/03/creating-web-services-with-apache-axis.html' title='Creating Web Services With Apache Axis'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_FUeZc98mol8/SbXxEw6caPI/AAAAAAAAAGU/D39shx-0cCo/s72-c/wsdl.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-1079765262449417024</id><published>2009-03-02T16:17:00.000-08:00</published><updated>2009-03-04T16:46:40.002-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Services'/><title type='text'>Installing Apache Axis</title><content type='html'>&lt;p&gt;Apache Axis is a very usefull software if you want to create web services with JSP. Apache Tomcat must be installed first if you want to install Apache Axis. In this tutorial, I assume you have installed Apache Tomcat. If you haven't installed Apache Tomcat, you can read my other tutorial about installing Apache Tomcat.&lt;/p&gt;
&lt;p&gt;These are some steps for installing Apache Axis.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Supporting Libraries&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Before installing Apache Axis, you also need these files as the supporting libraries.&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;&lt;a href="http://www.java2s.com/Code/JarDownload/activation.jar.zip"&gt;activation.jar&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.java2s.com/Code/JarDownload/mail.jar.zip"&gt;mail.jar&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.java2s.com/Code/JarDownload/xmlsec.jar.zip"&gt;xmlsec.jar&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Installing Apache Axis&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Download the latest version of Apache Axis from &lt;a href="http://ws.apache.org/axis/index.html"&gt;ws.apache.org/axis&lt;/a&gt;.&lt;/li&gt;
    &lt;li&gt;Extract the &lt;b&gt;axis-bin-1_4.zip&lt;/b&gt; in anywhere you like.&lt;/li&gt;
    &lt;li&gt;Copy the &lt;b&gt;axis&lt;/b&gt; folder inside the &lt;b&gt;webapps&lt;/b&gt; folder of the Axis distribution folder, to your Apache Tomcat &lt;b&gt;webapps&lt;/b&gt; folder.&lt;/li&gt;
    &lt;li&gt;Extract those 3 supporting libraries and copy the &lt;b&gt;.jar&lt;/b&gt; files to the &lt;b&gt;lib&lt;/b&gt; folder inside the &lt;b&gt;WEB-INF&lt;/b&gt; folder of your Axis installation folder.&lt;/li&gt;
    &lt;li&gt;Start your Apache Tomcat or restart it if you've got it running.&lt;/li&gt;
    &lt;li&gt;Access &lt;b&gt;http://localhost:8080/axis&lt;/b&gt;. If you see the result like below this, it means you have installed Apache Axis successfully. You can also click the &lt;b&gt;Validation&lt;/b&gt; link to check if your Axis' installation configuration is fine.
        &lt;br&gt;&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/Sax3jR53CmI/AAAAAAAAAF0/c9rf8gEhaDw/s1600-h/TestAxis.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 291px;" src="http://3.bp.blogspot.com/_FUeZc98mol8/Sax3jR53CmI/AAAAAAAAAF0/c9rf8gEhaDw/s400/TestAxis.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5308749508748184162" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br&gt;
    &lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-1079765262449417024?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/1079765262449417024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=1079765262449417024' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/1079765262449417024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/1079765262449417024'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2009/03/installing-apache-axis.html' title='Installing Apache Axis'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_FUeZc98mol8/Sax3jR53CmI/AAAAAAAAAF0/c9rf8gEhaDw/s72-c/TestAxis.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-7178572194737121108</id><published>2009-02-08T18:54:00.001-08:00</published><updated>2009-05-03T17:59:26.453-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><title type='text'>Simple Database Application With JSP</title><content type='html'>&lt;p&gt;This short tutorial will explain about creating a simple database application with JSP involving INSERT, UPDATE, DELETE, and also the SELECT process.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Preparing The Requirements&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;First, you need Apache Tomcat installed properly on you computer. I have written a tutorial about installing Apache Tomcat before this tutorial. You might want to read it first. Anyway, you also need to install &lt;a href="http://www.mysql.com"&gt;MySQL&lt;/a&gt; as database server and the &lt;i&gt;MySQL Connector for Java&lt;/i&gt; (available in &lt;i&gt;.jar&lt;/i&gt; format) as the supporting library. You can search the &lt;i&gt;MySQL Connector for Java&lt;/i&gt; with &lt;a href="http://www.google.com"&gt;Google&lt;/a&gt; or find it at &lt;a href="http://java.sun.com"&gt;java.sun.com&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Copy your MySQL Connector JAR file to the &lt;b&gt;lib&lt;/b&gt; folder under your Apache Tomcat installation directory. Then, restart your Apache Tomcat. Now, your Apache Tomcat is able to use that library.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Preparing Working Directory&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Before you start to write your code, you might want to create a special folder to store all your projects. If you want it, you can create a folder under the &lt;b&gt;webapps&lt;/b&gt; folder. In this example, I create a folder named &lt;b&gt;work&lt;/b&gt; under the &lt;b&gt;webapps&lt;/b&gt; folder to store my JSP files.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Creating The Database&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Create a simple database with the following SQL command.&lt;/p&gt;
&lt;div style="width:550px;height:100px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
CREATE DATABASE db1;
USE db1;

CREATE TABLE item (
  id char(3) NOT NULL default '',
  name varchar(20) NOT NULL default '',
  price int(6) NOT NULL default '0',
  PRIMARY KEY  (`id`)
);
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Creating The Database Class&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;For interacting with the database, I will make a special class. But first, you have to create some folders under your working directory with this structure.&lt;/p&gt;
&lt;pre&gt;
  WEB-INF/
    classes/
      database/
&lt;/pre&gt;
&lt;p&gt;And, this is the code for this class. Store it inside the &lt;b&gt;database&lt;/b&gt; folder with name &lt;b&gt;dbfunction.java&lt;/b&gt;.&lt;/p&gt;
&lt;div style="width:550px;height:300px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
package database;

import java.sql.*;

public class dbfunction{
 private Connection con;
 private Statement stat;
 private ResultSet result;
 
 public void createConnection(){
  try{
   Class.forName("com.mysql.jdbc.Driver");
   con=DriverManager.getConnection("jdbc:mysql://localhost/db1","user1","password");
  }
  catch(Exception ex){ }
 }

 public void createConnection(String driver, String url){
  try{
   Class.forName(driver);
   con=DriverManager.getConnection(url);
  }
  catch(Exception ex){ }
 }

 public void createConnection(String driver, String dataSource, String userName, String password){
  try{
   Class.forName(driver);
   con=DriverManager.getConnection(dataSource,userName,password);
  }
  catch(Exception ex){ }
 }

 public void closeConnection(){
  try{
   con.close();
  }
  catch(Exception ex){ }
 }

 public boolean updateRecord(String strSQL){
  try{
   stat=con.createStatement();
   
   int status=stat.executeUpdate(strSQL);
   if(status==1){
    return true;
   }
   else{
    return false;
   }
  }
  catch(Exception ex){
   return false;
  }
 }

 public ResultSet queryRecord(String strSQL){
  try{
   stat=con.createStatement();
   result=stat.executeQuery(strSQL);
   return result;
  }
  catch(Exception ex){
   return null;
  }
 }
}
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;Compile it.&lt;/p&gt;
&lt;div style="width:550px;overflow:auto;background-color:#000000;color:#FFFFFF;font-family:monospace;"&gt;
javac dbfunction.java
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;The Application&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Now, this is the time to create the main application. This application consists of three pages such as &lt;b&gt;index.jsp&lt;/b&gt;, &lt;b&gt;insert.jsp&lt;/b&gt;, and &lt;b&gt;update.jsp&lt;/b&gt;. Save all those files inside your working directory.&lt;/p&gt;
&lt;p&gt;&lt;u&gt;&lt;i&gt;index.jsp&lt;/i&gt;&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;This is the front page for displaying the records of the &lt;b&gt;item&lt;/b&gt; table. It also has two links in each row for updating and deleting record. And, this is the code of this file.&lt;/p&gt;
&lt;div style="width:550px;height:300px;overflow:scroll;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
&amp;lt;%@ page import=&amp;quot;java.sql.*&amp;quot; %&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;script language=&amp;quot;javascript&amp;quot; type=&amp;quot;text/javascript&amp;quot;&amp;gt;
 function confirmDelete(url){
  if(confirm(&amp;quot;Are you sure want to delete this record?&amp;quot;)){
   location.href=url;
  }
 }
&amp;lt;/script&amp;gt;
&amp;lt;title&amp;gt;Viewing Table&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;jsp:useBean id=&amp;quot;dbfunc&amp;quot; scope=&amp;quot;page&amp;quot; class=&amp;quot;database.dbfunction&amp;quot; /&amp;gt;
&amp;lt;center&amp;gt;
&amp;lt;%
try{
 dbfunc.createConnection();

 if(request.getParameter(&amp;quot;delete&amp;quot;)!=null){
  if(dbfunc.updateRecord(&amp;quot;DELETE FROM item WHERE id='&amp;quot; + request.getParameter(&amp;quot;delete&amp;quot;) + &amp;quot;'&amp;quot;))
   out.println(&amp;quot;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Deleting record success!&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;);
  else
   out.println(&amp;quot;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Deleting record failed!&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;);
 }

 ResultSet rs=dbfunc.queryRecord(&amp;quot;SELECT * FROM item&amp;quot;);

 out.println(&amp;quot;&amp;lt;table border='1'&amp;gt;&amp;quot;);
 out.println(&amp;quot;&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;Item ID&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Item Name&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Unit Price&amp;lt;/th&amp;gt;&amp;lt;th colspan='2'&amp;gt;&amp;amp;nbsp;&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&amp;quot;);
 while(rs.next()){
  out.println(&amp;quot;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;quot; + rs.getString(&amp;quot;id&amp;quot;) + &amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;quot; + rs.getString(&amp;quot;name&amp;quot;) + &amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;quot; + rs.getString(&amp;quot;price&amp;quot;) + &amp;quot;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href='update.jsp?id=&amp;quot; + rs.getString(&amp;quot;id&amp;quot;) + &amp;quot;'&amp;gt;Update&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href=javascript:confirmDelete('index.jsp?delete=&amp;quot; + rs.getString(&amp;quot;id&amp;quot;) + &amp;quot;')&amp;gt;Delete&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;quot;);
 }
 out.println(&amp;quot;&amp;lt;/table&amp;gt;&amp;quot;);
 out.println(&amp;quot;&amp;lt;br&amp;gt;&amp;quot;);
 out.println(&amp;quot;&amp;lt;a href='insert.jsp'&amp;gt;INSERT RECORD&amp;lt;/a&amp;gt;&amp;quot;);

 dbfunc.closeConnection();
}
catch(Exception ex){
 out.println(&amp;quot;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;&amp;quot; + ex.toString() + &amp;quot;&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;);
}
%&amp;gt;
&amp;lt;/center&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;u&gt;&lt;i&gt;insert.jsp&lt;/i&gt;&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;This page is for inserting the record to the &lt;b&gt;item&lt;/b&gt; table.&lt;/p&gt;
&lt;div style="width:550px;height:300px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Inserting Record&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;center&amp;gt;
&amp;lt;jsp:useBean id=&amp;quot;dbfunc&amp;quot; scope=&amp;quot;page&amp;quot; class=&amp;quot;database.dbfunction&amp;quot; /&amp;gt;
&amp;lt;%
if(request.getParameter(&amp;quot;insert&amp;quot;)!=null){
 try{
  dbfunc.createConnection();

  if(dbfunc.updateRecord(&amp;quot;INSERT INTO item VALUES ('&amp;quot; + request.getParameter(&amp;quot;itemId&amp;quot;) + &amp;quot;', '&amp;quot; + request.getParameter(&amp;quot;itemName&amp;quot;) + &amp;quot;', '&amp;quot; + request.getParameter(&amp;quot;unitPrice&amp;quot;) + &amp;quot;')&amp;quot;))
   out.println(&amp;quot;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Inserting record success!&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;);
  else
   out.println(&amp;quot;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Inserting record failed!&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;);

  dbfunc.closeConnection();
 }
 catch(Exception ex){
  out.println(&amp;quot;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;&amp;quot; + ex.toString() + &amp;quot;&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;);
 }
}
%&amp;gt;
&amp;lt;form action=&amp;quot;insert.jsp&amp;quot; method=&amp;quot;POST&amp;quot;&amp;gt;
&amp;lt;table&amp;gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Item ID&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;itemId&amp;quot; size=&amp;quot;10&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Item Name&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;itemName&amp;quot; size=&amp;quot;25&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Unit Price&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;unitPrice&amp;quot; size=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
&amp;lt;/table&amp;gt;
&amp;lt;br&amp;gt;
&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;insert&amp;quot; value=&amp;quot;INSERT&amp;quot;&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;br&amp;gt;
&amp;lt;a href=&amp;quot;index.jsp&amp;quot;&amp;gt;VIEW TABLE&amp;lt;/a&amp;gt;
&amp;lt;/center&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;u&gt;&lt;i&gt;update.jsp&lt;/i&gt;&lt;/u&gt;&lt;/p&gt;
&lt;p&gt;This page is for inserting the record to the &lt;b&gt;item&lt;/b&gt; table.&lt;/p&gt;
&lt;div style="width:550px;height:300px;overflow:auto;background-color:#EEEEEE;color:#000000;font-family:monospace;"&gt;
&lt;pre&gt;
&amp;lt;%@ page import=&amp;quot;java.sql.*&amp;quot; %&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Updating Record&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
&amp;lt;jsp:useBean id=&amp;quot;dbfunc&amp;quot; scope=&amp;quot;page&amp;quot; class=&amp;quot;database.dbfunction&amp;quot; /&amp;gt;
&amp;lt;center&amp;gt;
&amp;lt;%
try{
 ResultSet rs=null;

 dbfunc.createConnection();

 if(request.getParameter(&amp;quot;update&amp;quot;)!=null){
  if(dbfunc.updateRecord(&amp;quot;UPDATE item SET id='&amp;quot; + request.getParameter(&amp;quot;itemId&amp;quot;) + &amp;quot;',  name='&amp;quot; + request.getParameter(&amp;quot;itemName&amp;quot;) + &amp;quot;', price='&amp;quot; + request.getParameter(&amp;quot;unitPrice&amp;quot;) + &amp;quot;' WHERE id='&amp;quot; + request.getParameter(&amp;quot;id&amp;quot;) + &amp;quot;'&amp;quot;))
   out.println(&amp;quot;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Updating record success!&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;);
  else
   out.println(&amp;quot;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;Updating record failed!&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;);
 }

 if(request.getParameter(&amp;quot;id&amp;quot;)!=null)
  rs=dbfunc.queryRecord(&amp;quot;SELECT * FROM item WHERE id='&amp;quot; + request.getParameter(&amp;quot;id&amp;quot;) + &amp;quot;'&amp;quot;);

 if(rs.next()){
%&amp;gt;
  &amp;lt;form action=&amp;quot;update.jsp?id=&amp;lt;%= rs.getString(&amp;quot;id&amp;quot;) %&amp;gt;&amp;quot; method=&amp;quot;POST&amp;quot;&amp;gt;
  &amp;lt;table&amp;gt;
  &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Item ID&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;itemId&amp;quot; value=&amp;quot;&amp;lt;%= rs.getString(&amp;quot;id&amp;quot;) %&amp;gt;&amp;quot; size=&amp;quot;10&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
  &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Item Name&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;itemName&amp;quot; value=&amp;quot;&amp;lt;%= rs.getString(&amp;quot;name&amp;quot;) %&amp;gt;&amp;quot; size=&amp;quot;25&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
  &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Unit Price&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;unitPrice&amp;quot; value=&amp;quot;&amp;lt;%= rs.getString(&amp;quot;price&amp;quot;) %&amp;gt;&amp;quot; size=&amp;quot;15&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
  &amp;lt;/table&amp;gt;
  &amp;lt;br&amp;gt;
  &amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;update&amp;quot; value=&amp;quot;UPDATE&amp;quot;&amp;gt;
  &amp;lt;/form&amp;gt;

&amp;lt;%
 }

 dbfunc.closeConnection();
}
catch(Exception ex){
 out.println(&amp;quot;&amp;lt;p&amp;gt;&amp;lt;b&amp;gt;&amp;quot; + ex.toString() + &amp;quot;&amp;lt;/b&amp;gt;&amp;lt;/p&amp;gt;&amp;quot;);
}
%&amp;gt;
&amp;lt;br&amp;gt;
&amp;lt;a href=&amp;quot;index.jsp&amp;quot;&amp;gt;VIEW TABLE&amp;lt;/a&amp;gt;
&amp;lt;/center&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/pre&gt;
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Screenshots&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;These are the screenshots when the application was being run.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;u&gt;Inserting record.&lt;/u&gt;&lt;br&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FUeZc98mol8/SY-baI8X0zI/AAAAAAAAAEU/q-IrtJXkMZ0/s1600-h/insert.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 290px; height: 210px;" src="http://1.bp.blogspot.com/_FUeZc98mol8/SY-baI8X0zI/AAAAAAAAAEU/q-IrtJXkMZ0/s400/insert.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5300626159817970482" /&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Viewing record.&lt;/u&gt;&lt;br&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FUeZc98mol8/SY-baTvRFKI/AAAAAAAAAEc/GRdAZRu_rFM/s1600-h/browse.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 350px; height: 175px;" src="http://4.bp.blogspot.com/_FUeZc98mol8/SY-baTvRFKI/AAAAAAAAAEc/GRdAZRu_rFM/s400/browse.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5300626162715792546" /&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Deleting record.&lt;/u&gt;&lt;br&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/SY-baQ5YBXI/AAAAAAAAAEk/-f5AkFCR5rw/s1600-h/delete.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 386px; height: 233px;" src="http://3.bp.blogspot.com/_FUeZc98mol8/SY-baQ5YBXI/AAAAAAAAAEk/-f5AkFCR5rw/s400/delete.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5300626161952884082" /&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/SY-baRj4qZI/AAAAAAAAAEs/iLeN7Lk_7q8/s1600-h/delete_success.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 354px; height: 194px;" src="http://3.bp.blogspot.com/_FUeZc98mol8/SY-baRj4qZI/AAAAAAAAAEs/iLeN7Lk_7q8/s400/delete_success.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5300626162131184018" /&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;u&gt;Updating record.&lt;/u&gt;&lt;br&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FUeZc98mol8/SY-badsdVOI/AAAAAAAAAE0/FMQ2eQOdooA/s1600-h/update.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 300px; height: 211px;" src="http://4.bp.blogspot.com/_FUeZc98mol8/SY-badsdVOI/AAAAAAAAAE0/FMQ2eQOdooA/s400/update.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5300626165388367074" /&gt;&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-7178572194737121108?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/7178572194737121108/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=7178572194737121108' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/7178572194737121108'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/7178572194737121108'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2009/02/simple-database-application-with-jsp.html' title='Simple Database Application With JSP'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_FUeZc98mol8/SY-baI8X0zI/AAAAAAAAAEU/q-IrtJXkMZ0/s72-c/insert.png' height='72' width='72'/><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-637547636429418856</id><published>2009-02-01T17:08:00.000-08:00</published><updated>2009-02-01T19:40:57.968-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSP'/><title type='text'>Installing Apache Tomcat On Linux And Windows</title><content type='html'>&lt;p&gt;If you want to learn &lt;b&gt;JSP (Java Server Page)&lt;/b&gt; or create a website with JSP programming language, you need to install a web server named Apache Tomcat. Apache Tomcat can be installed both in Linux and Windows operating system.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Preparation&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Before you install Apache Tomcat, you need to install one of &lt;b&gt;JRE (Java Runtime Environment)&lt;/b&gt; or &lt;b&gt;JDK (Java Development Kit)&lt;/b&gt;. You can download the latest version of JRE or JDK from &lt;a href="http://sun.java.com"&gt;http://java.sun.com&lt;/a&gt;. If you are using Windows, you need to download the one for Windows platform, and if you are using Linux, you have to choose the one for Linux platform.&lt;/p&gt;
&lt;p&gt;Installing JRE or JDK on Windows is easy, just double click the installer and follow the instruction. Installing on Linux is also easy. Just execute this command as &lt;b&gt;root&lt;/b&gt;. I assume you save your JDK or JRE installer in &lt;b&gt;/usr/local&lt;/b&gt;.&lt;/p&gt;
&lt;div style="width:550;max-height:100;overflow:auto;background-color:#000000;color:#FFFFFF;font-family:monospace;"&gt;
# cd /usr/local
# ./jdk1.6.0_01.bin
&lt;/div&gt;&lt;br&gt;
&lt;p&gt;In this tutorial, I used JDK 1.5 for Windows with &lt;b&gt;C:\Program Files\Java\jdk1.5.0_06&lt;/b&gt; as its installation directory and JDK 1.6 for Linux with &lt;b&gt;/usr/local/java&lt;/b&gt; as its installation directory.&lt;/p&gt;
&lt;p&gt;After JRE or JDK is installed, you need to download the Apache Tomcat from &lt;a href="http://tomcat.apache.org/download-60.cgi"&gt;http://tomcat.apache.org/download-60.cgi&lt;/a&gt;. The version of Apache Tomcat used in this example is 6.0. Then, choose the binary version in &lt;b&gt;.tar.gz&lt;/b&gt; or &lt;b&gt;.zip&lt;/b&gt; format. In this example I choose the &lt;b&gt;.tar.gz&lt;/b&gt; format.&lt;/p&gt;
&lt;div align="center"&gt;
&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FUeZc98mol8/SYZItVL6fKI/AAAAAAAAAD0/b-QSbzOBg8M/s1600-h/Download_Tomcat.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 142px;" src="http://4.bp.blogspot.com/_FUeZc98mol8/SYZItVL6fKI/AAAAAAAAAD0/b-QSbzOBg8M/s400/Download_Tomcat.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5298001955266395298" /&gt;&lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;p&gt;The good news is, the binary file that you download can be installed on Windows or Linux. So, you don't have to download twice if you want to try installing it on those both platforms. That's right because Apache Tomcat is based on Java, that's why we need the JRE.&lt;/p&gt;
&lt;br&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Installation On Windows&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;The installation of Apache Tomcat on Windows has these following steps.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Extract the Apache Tomcat binary file to &lt;b&gt;C:&lt;/b&gt; or another location you like. After that, you will get the folder named &lt;b&gt;apache-tomcat-xxx&lt;/b&gt; depending on your Apache Tomcat version. Then, rename it to easier name like &lt;b&gt;apache-tomcat&lt;/b&gt; or another name if necessary.&lt;/li&gt;
&lt;li&gt;Set the &lt;b&gt;JAVA_HOME&lt;/b&gt; environment variable. This system variable is needed to tell the Apache Tomcat where the location of your JRE. So, open your Windows &lt;b&gt;Control Panel&lt;/b&gt;, choose &lt;b&gt;System&lt;/b&gt; then click the &lt;b&gt;Advance&lt;/b&gt; tab. Click the  &lt;b&gt;Environment Variables&lt;/b&gt; button, then click the &lt;b&gt;New&lt;/b&gt; button in &lt;b&gt;System Variabels&lt;/b&gt; frame. After that, a small window will appear. Write JAVA_HOME in the &lt;b&gt;Variable name&lt;/b&gt; TextBox. Then, write the location of your JDK or JRE installation in the &lt;b&gt;Variable value&lt;/b&gt; TextBox as you can see in the picture below.
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/SYZItkJ0yQI/AAAAAAAAAD8/CQ1FHTh_sqg/s1600-h/Environment_Var.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 300px; height: 121px;" src="http://3.bp.blogspot.com/_FUeZc98mol8/SYZItkJ0yQI/AAAAAAAAAD8/CQ1FHTh_sqg/s400/Environment_Var.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5298001959284164866" /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;Restart your computer to make the change take effect&lt;/li&gt;
&lt;li&gt;Now, start your Apache Tomcat by executing the &lt;b&gt;startup.bat&lt;/b&gt; file inside the &lt;b&gt;bin&lt;/b&gt; directory of you Apache Tomcat installation directory. When you start your Apache Tomcat, you will see this window appear.
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_FUeZc98mol8/SYZItgfzasI/AAAAAAAAAEE/TVKYd4oHm8s/s1600-h/Start_Tomcat.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 199px;" src="http://2.bp.blogspot.com/_FUeZc98mol8/SYZItgfzasI/AAAAAAAAAEE/TVKYd4oHm8s/s400/Start_Tomcat.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5298001958302608066" /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;Access &lt;b&gt;http://localhost:8080&lt;/b&gt;. If you see the Apache Tomcat welcome page that means you have successfully installed Apache Tomcat and ready to use JSP.&lt;/li&gt;
&lt;li&gt;If you want to shutdown the Apache Tomcat, execute &lt;b&gt;shutdown.bat&lt;/b&gt; file which is located in the same folder with the &lt;b&gt;startup.bat&lt;/b&gt; file.&lt;/li&gt;
&lt;/ol&gt;
&lt;br&gt;
&lt;p&gt;&lt;b&gt;&lt;u&gt;Installation On Linux&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;These are the installation steps on Linux operating system. You also need to login as &lt;b&gt;root&lt;/b&gt;.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Extract your the Apache Tomcat binary file on &lt;b&gt;/usr/local&lt;/b&gt;. I also assume you put your Apache Tomcat binary file on &lt;b&gt;/tmp&lt;/b&gt; folder. Then rename the &lt;b&gt;apache-tomcat-xxx&lt;/b&gt; folder with an easier name.
&lt;div style="width:550;max-height:100;overflow:auto;background-color:#000000;color:#FFFFFF;font-family:monospace;"&gt;
# cd /usr/local&lt;br&gt;
# tar -xvzf /tmp/apache-tomcat-xxx.tar.gz&lt;br&gt;
# mv apache-tomcat-xxx apache-tomcat
&lt;/div&gt;&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;Create the &lt;b&gt;setenv.sh&lt;/b&gt; file using the &lt;b&gt;vi&lt;/b&gt; editor inside the &lt;b&gt;bin&lt;/b&gt; folder. Press &lt;b&gt;I&lt;/b&gt; or &lt;b&gt;INSERT&lt;/b&gt; to enter the &lt;i&gt;insert mode&lt;/i&gt;.
&lt;div style="width:550;max-height:100;overflow:auto;background-color:#000000;color:#FFFFFF;font-family:monospace;"&gt;
# cd apache-tomcat/bin
# vi setenv.sh
&lt;/div&gt;&lt;br&gt;
This file is used to tell Apache Tomcat about the location of your JRE or JDK. The content of this file is like this.
&lt;div style="width:550;max-height:100;overflow:auto;background-color:#000000;color:#FFFFFF;font-family:monospace;"&gt;
#!/bin/sh&lt;br&gt;
#-----------------&lt;br&gt;
# Set Environment&lt;br&gt;
#-----------------&lt;br&gt;

JAVA_HOME=&lt;b&gt;"/usr/local/java"&lt;/b&gt;; export JAVA_HOME&lt;br&gt;
&lt;/div&gt;&lt;br&gt;
Please replace the &lt;b&gt;"/usr/local/java"&lt;/b&gt; with your JRE or JDK installation path.
&lt;/li&gt;
&lt;li&gt;Save the file by pressing &lt;b&gt;ESC : w q&lt;/b&gt;. Then make the file executable.
&lt;div style="width:550;max-height:100;overflow:auto;background-color:#000000;color:#FFFFFF;font-family:monospace;"&gt;
# chmod 755 setenv.sh
&lt;/div&gt;&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;Start your Apache Tomcat by executing the &lt;b&gt;startup.sh&lt;/b&gt; file.
&lt;div style="width:550;max-height:100;overflow:auto;background-color:#000000;color:#FFFFFF;font-family:monospace;"&gt;
# ./startup.sh
&lt;/div&gt;&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;Access &lt;b&gt;http://localhost:8080&lt;/b&gt; from your web browser. If you see this page, that means you have successfully installed Apache Tomcat.
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FUeZc98mol8/SYZItgqm3_I/AAAAAAAAAEM/pv0oIvyk-RY/s1600-h/Test_Tomcat.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 288px;" src="http://1.bp.blogspot.com/_FUeZc98mol8/SYZItgqm3_I/AAAAAAAAAEM/pv0oIvyk-RY/s400/Test_Tomcat.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5298001958347923442" /&gt;&lt;/a&gt;
&lt;/div&gt;&lt;br&gt;
&lt;/li&gt;
&lt;li&gt;To stop Apache Tomcat, simply execute the &lt;b&gt;shutdown.sh&lt;/b&gt; file.
&lt;div style="width:550;max-height:100;overflow:auto;background-color:#000000;color:#FFFFFF;font-family:monospace;"&gt;
# ./shutdown.sh
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-637547636429418856?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/637547636429418856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=637547636429418856' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/637547636429418856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/637547636429418856'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2009/02/installing-apache-tomcat-on-linux-and.html' title='Installing Apache Tomcat On Linux And Windows'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_FUeZc98mol8/SYZItVL6fKI/AAAAAAAAAD0/b-QSbzOBg8M/s72-c/Download_Tomcat.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-6107694382963466551</id><published>2009-01-15T19:26:00.000-08:00</published><updated>2009-01-20T16:32:53.052-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Blogging Tricks'/><title type='text'>Adding Google Page Rank To Your Blog</title><content type='html'>&lt;p&gt;Do you want to know how popular your website or blog in Google's "eye"? There is a tool which can help you for that. Its name is Google Page Rank.&lt;/p&gt;
&lt;U&gt;&lt;STRONG&gt;Where To Get It?&lt;/STRONG&gt;&lt;/U&gt;
&lt;p&gt;You can open &lt;a href="http://www.designbrigade.com/PageRankChecker"&gt;http://www.designbrigade.com/PageRankChecker&lt;/a&gt; to get the code. You have to enter the address of your blog and click submit. After that, you will get your page rank number. The bigger page rank number means your page popularity in Google is better. In this example, my blog's page rank is still zero :-(.&lt;/p&gt;
&lt;center&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_FUeZc98mol8/SXADj4gIvZI/AAAAAAAAADk/e48g_EH3YW4/s1600-h/PageRank.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 336px; height: 400px;" src="http://2.bp.blogspot.com/_FUeZc98mol8/SXADj4gIvZI/AAAAAAAAADk/e48g_EH3YW4/s400/PageRank.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5291733477157813650" /&gt;&lt;/a&gt;&lt;/center&gt;
&lt;br&gt;
&lt;p&gt;But this is not we are going to talk about. Do you see there are to page rank badges, one with black background and the other one with white background? We are going to put that badge in our blog. Choose the one you like by copying the HTML code in the textarea beside it.&lt;/p&gt;
&lt;br&gt;
&lt;U&gt;&lt;STRONG&gt;Add It To Your Blog&lt;/STRONG&gt;&lt;/U&gt;
&lt;p&gt;Just the same like my two previous tutorials. First, you have to log in to blogger. In your blogger dashboard, click &lt;b&gt;Layout&lt;/b&gt; then click the &lt;b&gt;Add Widget&lt;/b&gt; link and the popup window will appear. Then, choose &lt;b&gt;HTML/Javascript&lt;/b&gt; option and another popup windows will be shown. On that window, give the title for your page rank badge like Page Rank  or anything else. Then, paste the HTML code to the textarea. Click Save when you're ready.&lt;/p&gt;
&lt;p&gt;The detail of these steps are available in my previous tutorial about adding visitor counter.&lt;/p&gt;
&lt;center&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_FUeZc98mol8/SXADj2ws2iI/AAAAAAAAADs/7wvD9aoQafA/s1600-h/Blogger-Paste3.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 361px; height: 400px;" src="http://2.bp.blogspot.com/_FUeZc98mol8/SXADj2ws2iI/AAAAAAAAADs/7wvD9aoQafA/s400/Blogger-Paste3.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5291733476690418210" /&gt;&lt;/a&gt;&lt;/center&gt;
&lt;br&gt;
&lt;U&gt;&lt;STRONG&gt;Manage Its Place&lt;/STRONG&gt;&lt;/U&gt;
&lt;p&gt;Like the other widgets, you can also manage its place by dragging and dropping it to your desireable place. When you're done, you can click &lt;b&gt;Save&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;The screenshot of this process is also available in my previous tutorial about adding visitor counter.&lt;/p&gt;
&lt;br&gt;
&lt;U&gt;&lt;STRONG&gt;See It&lt;/STRONG&gt;&lt;/U&gt;
&lt;p&gt;Open your blog to see if it's work.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-6107694382963466551?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/6107694382963466551/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=6107694382963466551' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/6107694382963466551'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/6107694382963466551'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2009/01/adding-google-page-rank-to-your-blog.html' title='Adding Google Page Rank To Your Blog'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_FUeZc98mol8/SXADj4gIvZI/AAAAAAAAADk/e48g_EH3YW4/s72-c/PageRank.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-8489028795452819920</id><published>2009-01-15T19:24:00.000-08:00</published><updated>2009-01-18T20:53:46.787-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Blogging Tricks'/><title type='text'>Tracking Visitors' Location With Traffic Map</title><content type='html'>&lt;p&gt;In previous tutorial, you have known how to know the total visitors of your blog with a visitor counter. Anyway, do you want to know what country or city they came from? If you want that, you can use a tool that we call traffic map.&lt;/p&gt;
&lt;STRONG&gt;&lt;U&gt;Get &amp;amp; Copy The Code&lt;/U&gt;&lt;/STRONG&gt;
&lt;p&gt;First, you have to go to &lt;a href="http://feedjit.com/joinjs/"&gt;http://feedjit.com/joinjs/&lt;/a&gt;. On that page, you will find four nice gadgets for your blog. Choose the one named &lt;b&gt;Live Traffic Map&lt;/b&gt; and copy the HTML code.&lt;/p&gt;
&lt;center&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FUeZc98mol8/SXACxHUpaMI/AAAAAAAAADM/v_6jRC5PKuI/s1600-h/Feedjit-TraficMap.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 372px;" src="http://4.bp.blogspot.com/_FUeZc98mol8/SXACxHUpaMI/AAAAAAAAADM/v_6jRC5PKuI/s400/Feedjit-TraficMap.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5291732604962826434" /&gt;&lt;/a&gt;&lt;/center&gt;
&lt;br&gt;
&lt;br&gt;
&lt;U&gt;&lt;STRONG&gt;Paste It To Your Blog&lt;/STRONG&gt;&lt;/U&gt;
&lt;p&gt;Now, you can log in to blogger. In your blogger dashboard, click Layout then click the &lt;b&gt;Add Widget&lt;/b&gt; link and the popup window will appear. You should choose &lt;b&gt;HTML/Javascript&lt;/b&gt; option then another popup windows will be shown. On that window, you can give the title for your traffic map like &lt;i&gt;Traffic Map&lt;/i&gt; or another name. Then, paste the HTML code to the textarea. Click save when you're done.&lt;/p&gt;
&lt;p&gt;You can see the detail of these steps in my previous tutorial about adding visitor counter.&lt;/p&gt;
&lt;center&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FUeZc98mol8/SXACxZaJyPI/AAAAAAAAADU/McwpxdPeUyk/s1600-h/Blogger-Paste2.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 361px; height: 400px;" src="http://1.bp.blogspot.com/_FUeZc98mol8/SXACxZaJyPI/AAAAAAAAADU/McwpxdPeUyk/s400/Blogger-Paste2.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5291732609817757938" /&gt;&lt;/a&gt;&lt;/center&gt;
&lt;br&gt;
&lt;br&gt;
&lt;U&gt;&lt;STRONG&gt;Manage Its Place&lt;/STRONG&gt;&lt;/U&gt;
&lt;p&gt;You have added the traffic map to your blog. Now, you can manage its place by dragging and dropping it to your desireable place. If you feel statisfy about it, you can click Save.&lt;/p&gt;
&lt;p&gt;You can also see the screenshot of this process in my previous tutorial about adding visitor counter.&lt;p&gt;
&lt;U&gt;&lt;STRONG&gt;Test It&lt;/STRONG&gt;&lt;/U&gt;
&lt;p&gt;Now, open your blog and its traffic map may be looked like this.&lt;/p&gt;
&lt;center&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/SXACx3pNZnI/AAAAAAAAADc/zkfzETeUh3k/s1600-h/TrafficMap.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 180px; height: 177px;" src="http://3.bp.blogspot.com/_FUeZc98mol8/SXACx3pNZnI/AAAAAAAAADc/zkfzETeUh3k/s400/TrafficMap.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5291732617933973106" /&gt;&lt;/a&gt;&lt;/center&gt;
&lt;br&gt;
&lt;p&gt;The red spots are the location of your visitors. If you want the detail information like country and city name, you can point to one of those red spots with your mouse.&lt;/p&gt;
&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-8489028795452819920?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/8489028795452819920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=8489028795452819920' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/8489028795452819920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/8489028795452819920'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2009/01/tracking-visitors-location-with-traffic.html' title='Tracking Visitors&apos; Location With Traffic Map'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_FUeZc98mol8/SXACxHUpaMI/AAAAAAAAADM/v_6jRC5PKuI/s72-c/Feedjit-TraficMap.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-3940402859745588488</id><published>2009-01-11T20:42:00.001-08:00</published><updated>2009-01-11T21:31:26.253-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Blogging Tricks'/><title type='text'>Adding Visitor Counter To Your Blog</title><content type='html'>Visitor counter is a web component which can inform you about how many times your website has been visited. Visitor counter is a very usefull tool to measure your website's popularity. You can also add a visitor counter to your blog to see how popular your blog is. In this tutorial, I want to show you how to add a visitor counter to your blog.
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;u&gt;Get A Free Counter&lt;/u&gt;&lt;/strong&gt;
&lt;br&gt;
First thing you have to do is get a free counter from the internet. In this tutorial, I use a free counter from &lt;a href="http://free-counter-plus.com/"&gt;free-counter-plus.com&lt;/a&gt;. To get a free counter from &lt;a href="http://free-counter-plus.com/"&gt;free-counter-plus.com&lt;/a&gt;, you just need to enter your website address and from what number your counter will be started. After that, choose the style of counter you preferred. See the picture below.
&lt;br&gt;
&lt;br&gt;
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FUeZc98mol8/SWrLSKMgHdI/AAAAAAAAAB8/seu3gyfY1uY/s1600-h/FreeCounter-EnterUrl.jpg"&gt;&lt;img src="http://1.bp.blogspot.com/_FUeZc98mol8/SWrLSKMgHdI/AAAAAAAAAB8/seu3gyfY1uY/s400/FreeCounter-EnterUrl.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5290264225134943698" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;u&gt;Copy The Code&lt;/u&gt;&lt;/strong&gt;
&lt;br&gt;
Click on &lt;strong&gt;Sign Up&lt;/strong&gt; button, then you will get the HTML code for your counter. Don't worry if you don't understand about HTML, you just need to copy that code.
&lt;br&gt;
&lt;br&gt;
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_FUeZc98mol8/SWrL0EsBeJI/AAAAAAAAACE/u7_N164hjE4/s1600-h/FreeCounter-CopyCode.jpg"&gt;&lt;img src="http://2.bp.blogspot.com/_FUeZc98mol8/SWrL0EsBeJI/AAAAAAAAACE/u7_N164hjE4/s400/FreeCounter-CopyCode.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5290264807772092562" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
&lt;u&gt;&lt;strong&gt;Add Gadget and Paste The Code&lt;/strong&gt;&lt;/u&gt;
&lt;br&gt;
Log in to your blog, in this example I use blogger.
&lt;br&gt;
&lt;br&gt;
&lt;div align="center" try="" href="http://3.bp.blogspot.com/_FUeZc98mol8/SWrMNL4WFpI/AAAAAAAAACM/ej5FrZ_uiiE/s1600-h/Blogger-Dashboard.jpg"&gt;&lt;img src="http://3.bp.blogspot.com/_FUeZc98mol8/SWrMNL4WFpI/AAAAAAAAACM/ej5FrZ_uiiE/s400/Blogger-Dashboard.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5290265239199553170" /&gt;&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
In blogger dashboard, click on &lt;strong&gt;Layout&lt;/strong&gt; link then the page below will be shown.
&lt;br&gt;
&lt;br&gt;
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_FUeZc98mol8/SWrM7a_IERI/AAAAAAAAACc/HFL34m_otjU/s1600-h/Blogger-Layout.jpg"&gt;&lt;img src="http://2.bp.blogspot.com/_FUeZc98mol8/SWrM7a_IERI/AAAAAAAAACc/HFL34m_otjU/s400/Blogger-Layout.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5290266033528508690" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
Click on &lt;strong&gt;Add Gadget&lt;/strong&gt; link then the popup window below will appear.
&lt;br&gt;
&lt;br&gt;
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FUeZc98mol8/SWrM7dkeNCI/AAAAAAAAACk/ECEOvnc7ELw/s1600-h/Blogger-AddHTML.jpg"&gt;&lt;img src="http://4.bp.blogspot.com/_FUeZc98mol8/SWrM7dkeNCI/AAAAAAAAACk/ECEOvnc7ELw/s400/Blogger-AddHTML.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5290266034222019618" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
Scroll down on that window and find &lt;strong&gt;HTML/Javascript&lt;/strong&gt; option. If you have found it, click on the &lt;i&gt;plus&lt;/i&gt; sign. After that, a window like this will be shown.
&lt;br&gt;
&lt;br&gt;
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/SWrM7eUp5qI/AAAAAAAAACs/4FtYFaH26Ug/s1600-h/Blogger-Paste1.jpg"&gt;&lt;img src="http://3.bp.blogspot.com/_FUeZc98mol8/SWrM7eUp5qI/AAAAAAAAACs/4FtYFaH26Ug/s400/Blogger-Paste1.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5290266034424112802" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
Give the title for your counter like &lt;i&gt;Total Visitors&lt;/i&gt; or something else. Then paste the HTML code to the content textarea. If you understand about HTML, you can also costumize it. Click &lt;strong&gt;Save&lt;/strong&gt; to add new gadget to your blog.
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;u&gt;Manage Your Layout&lt;/u&gt;&lt;/strong&gt;
&lt;br&gt;
You can decide where your visitor counter will be placed. You can do it by dragging and dropping your gadget to the appropriate place.
&lt;br&gt;
&lt;br&gt;
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/SWrMd3nvKQI/AAAAAAAAACU/_lOT2NmYRls/s1600-h/Blogger-ManageLayout.jpg"&gt;&lt;img src="http://3.bp.blogspot.com/_FUeZc98mol8/SWrMd3nvKQI/AAAAAAAAACU/_lOT2NmYRls/s400/Blogger-ManageLayout.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5290265525818960130" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;br&gt;
Click &lt;strong&gt;Save&lt;/strong&gt; when you're done.
&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;&lt;u&gt;See The Result&lt;/u&gt;&lt;/strong&gt;
&lt;br&gt;
Now, open your blog to see the result of your work.
&lt;br&gt;
&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-3940402859745588488?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/3940402859745588488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=3940402859745588488' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/3940402859745588488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/3940402859745588488'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2009/01/adding-visitor-counter-to-your-blog.html' title='Adding Visitor Counter To Your Blog'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_FUeZc98mol8/SWrLSKMgHdI/AAAAAAAAAB8/seu3gyfY1uY/s72-c/FreeCounter-EnterUrl.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-4958349752309122488</id><published>2008-12-29T18:50:00.000-08:00</published><updated>2009-04-28T17:17:36.461-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>Installing RPM Files On Slackware Based Distributions</title><content type='html'>RPM is a very famous software package manager in Linux platform. RPM stands for RedHat Package Manager which means it will work well with RedHat based distributions such as Fedora, Mandriva, or SuSE. Is it possible installing RPM (.rpm) files on the other distribution base like Slackware or Debian? Yes, it is very possible. In this tutorial, I will show you how to install XCHM (CHM files viewer for Linux) RPM on Vector Linux (This is the Slackware based distribution). By the way, I used XCHM version 0.9 and it needs at least wxGTK version 2.4. If you use XCHM version 1.0 or above you need wxGTK 2.6 or newer.
&lt;ol&gt;&lt;li&gt;I assume you have downloaded such files : &lt;strong&gt;xchm-0.9.7-1.i586.rpm&lt;/strong&gt; and &lt;strong&gt;chmlib-0.35-1.1.fc2.dag.i386.rpm&lt;/strong&gt;. You can find them with Google.
&lt;/li&gt;&lt;li&gt;Login to your console as root.
&lt;/li&gt;&lt;li&gt;Use rpm2tgz command to convert those RPM files into TGZ (.tgz) files. Slackware use TGZ files as its software package manager. Just type the command &lt;strong&gt;rpm2tgz xchm-0.9.7-1.i586.rpm&lt;/strong&gt; and wait until the conversion process finish. Then convert the second RPM files with the same command &lt;strong&gt;rpm2tgz chmlib-0.35-1.1.fc2.dag.i386.rpm&lt;/strong&gt; and wait until the process finish.
&lt;/li&gt;&lt;li&gt;Install the chmlib first with command &lt;strong&gt;installpkg chmlib-0.35-1.1.fc2.dag.i386.tgz&lt;/strong&gt;.
&lt;/li&gt;&lt;li&gt;Then install the xchm with command &lt;strong&gt;installpkg xchm-0.9.7-1.i586.tgz&lt;/strong&gt;.
&lt;/li&gt;&lt;li&gt;Try to run the application by typing &lt;strong&gt;xchm&lt;/strong&gt; in your console.
&lt;/li&gt;&lt;/ol&gt;
You can use RPM command as well in Slackware, but it is strongly recommended if you convert it to TGZ file first, then install it with  &lt;strong&gt;installpkg&lt;/strong&gt; command. If you want to remove that program you can use &lt;strong&gt;removepkg&lt;/strong&gt; command followed by your package name or you can use &lt;strong&gt;pkgtool&lt;/strong&gt; program which has an ncurses based interface.

Anyway, what if you use the Debian based distribution like Ubuntu? You can use the same steps, but you have to replace the rpm2tgz command with the &lt;strong&gt;alien&lt;/strong&gt; command. That command will produce DEB (.deb) files. And to install them just use &lt;strong&gt;apt-get --install&lt;/strong&gt; command followed by your DEB file name.
&lt;br&gt;&lt;br&gt;
&lt;div align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FUeZc98mol8/SfecjH_OjOI/AAAAAAAAAI4/1sLJtlK4UjA/s1600-h/XCHM.png"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 331px;" src="http://4.bp.blogspot.com/_FUeZc98mol8/SfecjH_OjOI/AAAAAAAAAI4/1sLJtlK4UjA/s400/XCHM.png" border="0" alt=""id="BLOGGER_PHOTO_ID_5329900811269868770" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;strong&gt;The XCHM&lt;/strong&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-4958349752309122488?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/4958349752309122488/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=4958349752309122488' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/4958349752309122488'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/4958349752309122488'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2008/12/installing-rpm-files-on-slackware-based.html' title='Installing RPM Files On Slackware Based Distributions'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_FUeZc98mol8/SfecjH_OjOI/AAAAAAAAAI4/1sLJtlK4UjA/s72-c/XCHM.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-2833426823163519073</id><published>2008-11-18T00:58:00.000-08:00</published><updated>2008-12-02T20:24:16.344-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL And Database'/><title type='text'>How To Reset MySQL Root Password</title><content type='html'>Do you forget your MySQL root password and can't login? Don't panic. You don't have to re-install your MySQL as long as you still have the privileges to start and stop the MySQL service. Just follow these instruction:
&lt;br&gt;&lt;br&gt;
1. Stop your MySQL service.&lt;br&gt;
2. Start your MySQL service with this following command:
&lt;blockquote&gt;&lt;i&gt;mysqld --skip-grant-tables&lt;/i&gt;
&lt;br&gt;&lt;br&gt;
This command will start your MySQL service without checking the users tables everytime users login. So, you can login as root and reset your password.&lt;/blockquote&gt;
3. Update your root password with this command.
&lt;blockquote&gt;&lt;i&gt;USE mysql;&lt;br&gt;
UPDATE user SET password=PASSWORD('new password') WHERE user='root';&lt;/i&gt;&lt;/blockquote&gt;
4. Refresh the users' privileges.
&lt;blockquote&gt;&lt;i&gt;FLUSH privileges;&lt;/i&gt;&lt;/blockquote&gt;
&lt;br&gt;
Now, your MySQL root password has been updated with the new password. You can login to MySQL with that new password.&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-2833426823163519073?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/2833426823163519073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=2833426823163519073' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/2833426823163519073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/2833426823163519073'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2008/11/how-to-reset-mysql-root-password.html' title='How To Reset MySQL Root Password'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-5537348050586171659</id><published>2008-11-11T21:29:00.000-08:00</published><updated>2008-11-13T23:33:03.004-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL And Database'/><title type='text'>Paging In Oracle</title><content type='html'>Oracle doesn't have the &lt;strong&gt;LIMIT&lt;/strong&gt; keyword like MySQL. So, how can we do paging in Oracle? There is a little trick to do it.&lt;br/&gt;&lt;br/&gt;Let's assume there is a table named &lt;strong&gt;table1&lt;/strong&gt; and it has two fields such as &lt;strong&gt;trans_id&lt;/strong&gt; and &lt;strong&gt;user&lt;/strong&gt;. When we execute the SELECT statement, the result will be like this:&lt;br/&gt;&lt;pre&gt;SELECT trans_id, user FROM table1 ORDER BY trans_id;&lt;br/&gt;&lt;br/&gt;TRANS_ID    USER&lt;br/&gt;----------- ------&lt;br/&gt;080003      001   &lt;br/&gt;080003      001   &lt;br/&gt;080003      001   &lt;br/&gt;080005      001   &lt;br/&gt;080005      001   &lt;br/&gt;080024      002   &lt;br/&gt;080024      002   &lt;br/&gt;080025      001   &lt;br/&gt;080151      001   &lt;br/&gt;080151      001   &lt;br/&gt;080296      001   &lt;br/&gt;080296      001   &lt;br/&gt;080413      003   &lt;br/&gt;080427      ADMIN&lt;br/&gt;&lt;/pre&gt;&lt;br/&gt;First step to do the paging is we will use that result as a    table. The trick will start here. We're going to add a new field to display  the row number for the result. The row number will be our key to do the paging. So, the query and its result will be like this:&lt;br/&gt;&lt;pre&gt;SELECT &lt;strong&gt;rownum rn&lt;/strong&gt;, t1.* FROM (SELECT trans_id, user FROM table1&lt;br/&gt;ORDER BY trans_id) t1 ;&lt;br/&gt;&lt;br/&gt;   RN TRANS_ID    USER&lt;br/&gt;----- ----------- ------&lt;br/&gt;    1 080003      001 &lt;br/&gt;    2 080003      001 &lt;br/&gt;    3 080003      001 &lt;br/&gt;    4 080005      001 &lt;br/&gt;    5 080005      001 &lt;br/&gt;    6 080024      002 &lt;br/&gt;    7 080024      002 &lt;br/&gt;    8 080025      001 &lt;br/&gt;    9 080151      001 &lt;br/&gt;   10 080151      001 &lt;br/&gt;   11 080296      001 &lt;br/&gt;   12 080296      001 &lt;br/&gt;   13 080413      003 &lt;br/&gt;   14 080427      ADMIN&lt;/pre&gt;&lt;br/&gt;Next step. Based on the result, we will use it as a table. Then use the &lt;strong&gt;rn &lt;/strong&gt;field to do the paging. For example we're going to show only the top five of the result. So, our query will be like this :&lt;br/&gt;&lt;pre&gt;SELECT * FROM (SELECT rownum rn, t1.* FROM (SELECT trans_id, user FROM table1&lt;br/&gt;ORDER BY trans_id) t1) t2 WHERE &lt;b&gt;rn BETWEEN 1 AND 5&lt;/b&gt;;&lt;br/&gt;&lt;br/&gt;   RN TRANS_ID    USER&lt;br/&gt;----- ----------- ------&lt;br/&gt;    1 080003      001 &lt;br/&gt;    2 080003      001 &lt;br/&gt;    3 080003      001 &lt;br/&gt;    4 080005      001 &lt;br/&gt;    5 080005      001 &lt;/pre&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-5537348050586171659?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/5537348050586171659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=5537348050586171659' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/5537348050586171659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/5537348050586171659'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2008/11/paging-in-oracle.html' title='Paging In Oracle'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-6121717708488140607</id><published>2008-10-06T17:18:00.000-07:00</published><updated>2008-10-07T22:43:39.740-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>How To Make NuSOAP Work With PHP 5</title><content type='html'>NuSOAP is a very usefull SOAP Toolkit for developing web service with PHP. You won't have any problem when using it with PHP 4. But, if you are using PHP 5, you might find a little problem. PHP 5 has its own SOAP extension, so     if that  SOAP extension is loaded it will conflict with NuSOAP and you will get an error message like this:&lt;br/&gt;&lt;br/&gt;&lt;i&gt;Fatal error: Cannot redeclare class soapclient in C:\xampp\htdocs\lib\nusoap.php on line 7240&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;There are two alternatives to solve this problem.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;&lt;u&gt;First Alternative&lt;/u&gt;&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;You can de-activated PHP SOAP extension by editting the &lt;i&gt;php.ini&lt;/i&gt; file. Give a semicolon (;)  in the front of the line says &lt;i&gt;extension=php_soap.dll&lt;/i&gt;. So, that line should be look like this:&lt;br/&gt;&lt;br/&gt;&lt;i&gt;;extension=php_soap.dll&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;Restart your web server to make the change take effect.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;u&gt;&lt;strong&gt;Second Alternative&lt;/strong&gt;&lt;/u&gt;&lt;br/&gt;&lt;br/&gt;You can also modify the &lt;i&gt;nusoap.php&lt;/i&gt; file to rename the &lt;i&gt;soapclient&lt;/i&gt; class to another name like &lt;i&gt;soap_client&lt;/i&gt;.  You can use your favorite text editor and replace all &lt;i&gt;soapclient&lt;/i&gt; text with &lt;i&gt;soap_client&lt;/i&gt;. So, if you want to make an instance from NuSOAP client you have to use the syntax like this:&lt;br/&gt; &lt;br/&gt;&lt;i&gt;$client=new soap_client($url);&lt;/i&gt;&lt;br/&gt;&lt;br/&gt;This way is good if you want to use NuSOAP but you still want to retain the PHP SOAP extension.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-6121717708488140607?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/6121717708488140607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=6121717708488140607' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/6121717708488140607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/6121717708488140607'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2008/10/how-to-make-nusoap-work-with-php-5.html' title='How To Make NuSOAP Work With PHP 5'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-6886699640174780129</id><published>2008-09-23T23:47:00.000-07:00</published><updated>2008-10-07T22:42:50.915-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Integrating PHP with Microsoft IIS</title><content type='html'>PHP always identic with Apache web server. But, do you know that the other web servers can be used together with PHP as well as Apache? This short tutorial will show you how to use PHP alongside with Microsoft Internet Information Services (IIS).&lt;br/&gt;&lt;strong&gt;&lt;u&gt;&lt;br/&gt;Prepare the software&lt;/u&gt;&lt;/strong&gt;&lt;br/&gt;First, you have to prepare these software:&lt;br/&gt;&lt;ol&gt;&lt;li&gt;&lt;i&gt;Microsoft IIS&lt;/i&gt; from Microsoft Windows CD&lt;br/&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;PHP&lt;/i&gt; (zip version). You can find it at &lt;a href="http://www.php.net/" target="_blank"&gt;www.php.net&lt;/a&gt;&lt;br/&gt;&lt;/li&gt;&lt;/ol&gt;&lt;strong&gt;&lt;u&gt;Installation&lt;br/&gt;&lt;/u&gt;&lt;/strong&gt;If you have IIS and PHP installed on you computer, you can skip this part.&lt;br/&gt;&lt;ol&gt;&lt;li&gt;Install IIS&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;Insert the Microsoft Windows CD.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;  Open &lt;i&gt;Control Panel&lt;/i&gt; and choose &lt;i&gt;Add or Remove Programs&lt;/i&gt;.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;  Click on &lt;i&gt;Add/Remove Windows Components&lt;/i&gt;.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;  Give a check mark on &lt;i&gt;Internet Information Services&lt;/i&gt;.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;  Click &lt;i&gt;Next&lt;/i&gt; and follow the installation instruction until finish.&lt;br/&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol&gt;&lt;li&gt;&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Install PHP&lt;br/&gt;&lt;/li&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;  Extract the zipped file to &lt;i&gt;C:\php5&lt;/i&gt;.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;  Copy &lt;i&gt;php.ini-dist&lt;/i&gt; to &lt;i&gt;C:\Windows&lt;/i&gt; then rename it to &lt;i&gt;php.ini.&lt;/i&gt;&lt;br/&gt;&lt;/li&gt;&lt;li&gt;  Edit your &lt;i&gt;php.ini &lt;/i&gt;and&lt;i&gt; &lt;/i&gt;find this following line :&lt;span&gt; &lt;/span&gt;&lt;i&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;extension_dir="./"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;. Change it to &lt;i&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;extension_dir="C:\php5\ext\"&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;.&lt;/li&gt;&lt;/ul&gt;&lt;strong&gt;&lt;u&gt;Configure your IIS&lt;br/&gt;&lt;/u&gt;&lt;/strong&gt;Let's configure IIS.&lt;br/&gt;&lt;ol&gt;&lt;li&gt;Open Windows &lt;i&gt;Control Panel&lt;/i&gt;. Click &lt;i&gt;Administrative Tools&lt;/i&gt;, then click &lt;i&gt;Internet Information Services&lt;/i&gt;.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Click the "+" sign beside your computer name, then click on the same sign beside the &lt;i&gt;Web Sites&lt;/i&gt; folder.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;You will find the &lt;i&gt;Default Web Site&lt;/i&gt; and you have to right-click on it and choose &lt;i&gt;properties&lt;/i&gt; to start configuring you IIS.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Click the &lt;i&gt;Home Directory&lt;/i&gt; tab. Find the &lt;i&gt;Configuration&lt;/i&gt; button and click it.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;On the &lt;i&gt;Mapping&lt;/i&gt; tab, click the &lt;i&gt;Add&lt;/i&gt; button.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Now, you are about adding the &lt;i&gt;.php&lt;/i&gt; extension so the PHP file can be processed by IIS. In the &lt;i&gt;executable&lt;/i&gt; textbox you have to point to the full path of the &lt;i&gt;php5isapi.dll&lt;/i&gt; file location for parsing PHP file. You can click browse to find it. In this example, the location of &lt;i&gt;php5isapi.dll&lt;/i&gt; is in &lt;i&gt;C:\php5&lt;/i&gt;.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;In the &lt;i&gt;extension&lt;/i&gt; textbox, you have to fill it with the PHP file extension which is &lt;i&gt;.php&lt;/i&gt;. Click &lt;i&gt;OK&lt;/i&gt;.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Finish? Not yet. Back to the &lt;i&gt;Default Web Site's properties &lt;/i&gt;window, click on &lt;i&gt;Documents&lt;/i&gt; tab. Now you are about configuring the default page for IIS. Click &lt;i&gt;Add&lt;/i&gt; and type &lt;i&gt;index.php&lt;/i&gt; for the default document name. Click OK.&lt;br/&gt;&lt;/li&gt;&lt;/ol&gt;&lt;strong&gt;&lt;u&gt;Testing&lt;/u&gt;&lt;/strong&gt;&lt;br/&gt;Create the &lt;i&gt;phpinfo.php&lt;/i&gt; file which has simple content like this.&lt;br/&gt;&lt;br/&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;i&gt;&amp;lt;?php phpinfo(); ?&amp;gt;&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;Save it in your web server directory (&lt;i&gt;C:\Inetpub\wwwroot&lt;/i&gt;) and call it from your web browser.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;&lt;u&gt;More Options&lt;/u&gt;&lt;/strong&gt;&lt;br/&gt;If you want to use a database server, you have to activate the PHP extension to the related database server. For example if you want to use MySQL, you have to uncomment the line like this &lt;i&gt;;extension=php_mysql.dll&lt;/i&gt;. After that, don't forget to copy the &lt;i&gt;libmysql.dll&lt;/i&gt; file from &lt;i&gt;C:\php5&lt;/i&gt; to &lt;i&gt;C:\Windows\System32&lt;/i&gt;.&lt;br/&gt;&lt;br/&gt;The same way can be applied if you want to use Oracle database server. First, you have to uncomment the line that says &lt;i&gt;;extension=php_oci8.dll&lt;/i&gt;. The next step is a little bit different. You have to copy &lt;i&gt;oci.dll&lt;/i&gt; file from your &lt;i&gt;Oracle Instant Client&lt;/i&gt; directory to &lt;i&gt;C:\Windows\System32&lt;/i&gt;. You also have to set some environment variables such as &lt;i&gt;PATH&lt;/i&gt; and &lt;i&gt;NLS_LANG&lt;/i&gt;. You can see my previous tutorial about &lt;a href="http://bogeyman2007.blogspot.com/2008/09/connecting-to-oracle-8-with-php.html"&gt;Connecting To Oracle 8 With PHP&lt;/a&gt; for further information.&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-6886699640174780129?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/6886699640174780129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=6886699640174780129' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/6886699640174780129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/6886699640174780129'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2008/09/integrating-php-with-microsoft-iis.html' title='Integrating PHP with Microsoft IIS'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-7354103872425530934</id><published>2008-09-17T18:11:00.000-07:00</published><updated>2008-10-07T22:42:06.027-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Connecting To Oracle 8 With PHP</title><content type='html'>Connecting to Oracle database with PHP is not as easy as connecting to MySQL. There are few steps to do before your PHP can connect to Oracle database.&lt;br/&gt;&lt;br/&gt;In this tutorial, I try to connect to Oracle with PHP from a Windows machine.&lt;br/&gt;&lt;strong&gt;&lt;br/&gt;&lt;/strong&gt;&lt;strong&gt;&lt;u&gt;The Software&lt;/u&gt;&lt;/strong&gt;&lt;br/&gt;These are the lists of software I used to test this tutorial:&lt;ol&gt;&lt;li&gt;XAMPP 1.6.7&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Oracle Instant Client 10.1 for Windows&lt;/li&gt;&lt;li&gt;Oracle 8i Database Server (remote or local)&lt;/li&gt;&lt;/ol&gt;&lt;strong&gt;&lt;u&gt;Preparing The System&lt;/u&gt;&lt;/strong&gt;&lt;br/&gt;These are the steps to preparing your system before you can connect to Oracle using PHP.&lt;br/&gt;&lt;ol&gt;&lt;li&gt;Install XAMPP.&lt;li&gt;Install Oracle if you want to use a local database server.&lt;/li&gt;&lt;li&gt;Extract the Oracle Instant Client to C:&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Copy &lt;i&gt;oci.dll&lt;/i&gt; file to &lt;i&gt;C:\xampp\apache\bin&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;Add the Oracle Instant Client path (&lt;i&gt;C:\instantclient10_1&lt;/i&gt;)  to your system PATH.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Add &lt;i&gt;NLS_LANG&lt;/i&gt; as a new system variable. Fill it's value with &lt;i&gt;american_america.we8iso8859p1&lt;/i&gt;.&lt;/li&gt;&lt;li&gt;Restart your system to make the changes take effect. &lt;/li&gt;&lt;/ol&gt;&lt;strong&gt;&lt;u&gt;Edit Your php.ini&lt;/u&gt;&lt;/strong&gt;&lt;br/&gt;&lt;i&gt;php.ini&lt;/i&gt; file for XAMPP can be found in &lt;i&gt;C:\xampp\apache\bin&lt;/i&gt;. Open that file with your text editor and find this following line:&lt;br/&gt;&lt;br/&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;;extension=php_oci8.dll&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;Uncomment that line so it will be looked like this:&lt;br/&gt;&lt;br/&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;extension=php_oci8.dll&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;Save that file and then restart your Apache web server. If no error message appear that mean the Oracle module for PHP is loaded properly.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;&lt;u&gt;Test It!&lt;/u&gt;&lt;/strong&gt;&lt;br/&gt;Now, prepare the PHP script to test the connection with Oracle. I made the script like this:&lt;br/&gt;&lt;br/&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;$host='10.234.2.12';&lt;br/&gt;$user='USER';&lt;br/&gt;$passwd='123456';&lt;br/&gt;$service_name='TEST';&lt;br/&gt;&lt;br/&gt;$db='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)&lt;br/&gt;(HOST='.$host.')(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME = '.$service_name.')))';&lt;br/&gt;&lt;br/&gt;$con=oci_connect($user,$passwd,$db);&lt;br/&gt;&lt;br/&gt;if($con){&lt;br/&gt;          echo 'Connected to Oracle.';&lt;br/&gt;}&lt;br/&gt;else{&lt;br/&gt;          echo 'Cannot connect to Oracle.';&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;oci_close($con);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br/&gt;&lt;br/&gt;Run the script and see if it works.&lt;br/&gt;&lt;br/&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-7354103872425530934?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/7354103872425530934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=7354103872425530934' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/7354103872425530934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/7354103872425530934'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2008/09/connecting-to-oracle-8-with-php.html' title='Connecting To Oracle 8 With PHP'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-2668929635143897466</id><published>2008-05-01T21:16:00.000-07:00</published><updated>2009-04-28T17:31:42.427-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>iReport Tutorial (part 4) - Calling Report With Parameter</title><content type='html'>&lt;p&gt;Sometimes we need to pass one or more parameters to our report. For example, we may need to generate a report for some items with a spesific category or price. Based on our previous tutorial, we're going to make a report to view the contacts list with a certain address. For this tutorial, you have to create a new report.&lt;/p&gt;
&lt;b&gt;&lt;u&gt;Adding New Parameter&lt;/u&gt;&lt;/b&gt;
&lt;p&gt;You need to specify address as a parameter, so click on &lt;b&gt;View&lt;/b&gt; menu, then click &lt;b&gt;Parameters&lt;/b&gt;. Click &lt;b&gt;New&lt;/b&gt; to add new parameter. Give a name for your new parameter and specify its data type. For example, I give the name &lt;i&gt;PRM_ADDRESS&lt;/i&gt; for this parameter and its data type is &lt;i&gt;String&lt;/i&gt;. After that, give a check mark on &lt;i&gt;Use as a prompt&lt;/i&gt; option. You can see the picture below for a clearer information.&lt;/p&gt;
&lt;p align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FUeZc98mol8/SfefvDUXOxI/AAAAAAAAAJ4/3-oBf_dW89c/s1600-h/Image8.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 300px; height: 341px;" src="http://1.bp.blogspot.com/_FUeZc98mol8/SfefvDUXOxI/AAAAAAAAAJ4/3-oBf_dW89c/s400/Image8.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5329904314709654290" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;b&gt;&lt;u&gt;Create Report Query&lt;/u&gt;&lt;/b&gt;
&lt;p&gt;After you create a new parameter, you have to create report query based on that new parameter. How we do this? Click on &lt;b&gt;Data&lt;/b&gt; menu, then click on &lt;b&gt;Report Query&lt;/b&gt;. In the query text box, type this SQL command: &lt;b&gt;SELECT * FROM contact WHERE address=$P{PRM_ADDRESS}&lt;/b&gt;.&lt;/p&gt;
&lt;p&gt;As you can see the &lt;u&gt;&lt;i&gt;$P{PRM_ADDRESS}&lt;/i&gt;&lt;/u&gt; represents the parameter that you've made before.&lt;/p&gt;
&lt;p&gt;After that, you have to design the report. The report's layout is up to you now. I will not talk about how to design the report here because I have talked about it in the previous tutorial.&lt;/p&gt;
&lt;b&gt;&lt;u&gt;Write Your Code&lt;/u&gt;&lt;/b&gt;
&lt;p&gt;Let's write the code! Same like the previous tutorial, I'll give you all the code so you can copy-paste and modify it if necessary.&lt;/p&gt;
&lt;textarea cols="75" rows="20"&gt;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import net.sf.jasperreports.view.*;
import net.sf.jasperreports.engine.*;
import java.sql.*;
import java.util.*;

public class testParameter extends JFrame implements ActionListener{
 JasperPrint JPrint;
 JButton btnShowReport;
 JLabel lblParameter;
 JTextField txtParameter;

 // INITIALIZE GUI COMPONENTS
 public void initComponent(){
  btnShowReport=new JButton("SHOW REPORT");
  btnShowReport.setMnemonic('S');
  btnShowReport.addActionListener(this);

  lblParameter=new JLabel("Address");

  txtParameter=new JTextField(15);
 }

 // DESIGN THE FORM
 public void design(){
  setTitle("Test Parameter");
  getContentPane().setLayout(new FlowLayout());
  getContentPane().add(lblParameter);
  getContentPane().add(txtParameter);
  getContentPane().add(btnShowReport);
  pack();
  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  show();
 }

 // SHOW THE REPORT
 public void showReport(){
  try{
   // PREPARING DATABASE CONNECTION
   String jdbcDriver = "com.mysql.jdbc.Driver";
   Class.forName(jdbcDriver);
   String url = "jdbc:mysql://localhost/contact";
   String user = "user1";
   String pass = "password";
 
   Connection con = DriverManager.getConnection(url, user, pass);

   // PATH TO YOUR JASPER FILE
   String fullPath="/home/lucky/Documents/Java/report/TestParameter.jasper";
   // PREPARE THE PARAMETERS
   Map&lt;String, Object&gt; param=new HashMap&lt;String, Object&gt;();
   param.put("PRM_ADDRESS",txtParameter.getText());
   // FILL THE REPORT
   JPrint=JasperFillManager.fillReport(fullPath,param,con);
   // VIEW THE REPORT
   JasperViewer.viewReport(JPrint,false);
   // CLOSE CONNECTION
   con.close();
  }
  catch(Exception ex){
   System.out.println(ex.toString());
  }
 }

 // CONTRUCTOR
 testParameter(){
  initComponent();
  design();
 }

 public static void main(String[] args){
  new testParameter();
 }

 // EVENT LISTENER
 public void actionPerformed(ActionEvent ae){
  // IF SHOW BUTTON CLICKED, SHOW THE REPORT
  if(ae.getSource()==btnShowReport)
   showReport();
 }
}
&lt;/textarea&gt;
&lt;br&gt;&lt;br&gt;
&lt;b&gt;&lt;u&gt;Execute It!&lt;/u&gt;&lt;/b&gt;
&lt;p&gt;Final step is execute your program. Don't forget to set the &lt;i&gt;CLASSPATH&lt;/i&gt;. If you forget how to do that, you can see the previous tutorial right before this one.&lt;/p&gt;
&lt;p align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_FUeZc98mol8/SfefvDkImmI/AAAAAAAAAKA/EqXj8Kbuhws/s1600-h/Image9.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 325px; height: 55px;" src="http://2.bp.blogspot.com/_FUeZc98mol8/SfefvDkImmI/AAAAAAAAAKA/EqXj8Kbuhws/s400/Image9.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5329904314775804514" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FUeZc98mol8/SfefvfrZapI/AAAAAAAAAKI/-fFulBtih7w/s1600-h/Image10.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 243px;" src="http://4.bp.blogspot.com/_FUeZc98mol8/SfefvfrZapI/AAAAAAAAAKI/-fFulBtih7w/s400/Image10.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5329904322322459282" /&gt;&lt;/a&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-2668929635143897466?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/2668929635143897466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=2668929635143897466' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/2668929635143897466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/2668929635143897466'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2008/05/ireport-tutorial-part-4-calling-report.html' title='iReport Tutorial (part 4) - Calling Report With Parameter'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_FUeZc98mol8/SfefvDUXOxI/AAAAAAAAAJ4/3-oBf_dW89c/s72-c/Image8.jpg' height='72' width='72'/><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-2760273660042817072</id><published>2008-05-01T21:09:00.000-07:00</published><updated>2009-04-28T17:29:26.070-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>iReport Tutorial (part 3) - Calling Report From Java Application</title><content type='html'>&lt;p&gt;In the previous tutorial, you've learnt how to create a report with iReport. You must be realized that the report can only be executed from iReport. But, in the real case that report should be able to be executed from the other application (usually Java application). How we do this?&lt;/p&gt;
&lt;b&gt;&lt;u&gt;Setting CLASSPATH&lt;/u&gt;&lt;/b&gt;
&lt;p&gt;The first thing you have to do is set your CLASSPATH environment variable. Why? Because Java needs to load some libraries which are needed to execute that report. Those libraries are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;i&gt;jasperreports-2.0.4.jar&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;commons-digester-1.7.jar&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;commons-logging-1.0.2.jar&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;commons-collections-2.1.jar&lt;/i&gt;&lt;/li&gt;
&lt;li&gt;&lt;i&gt;mysql-connector-java-3.1.11-bin.jar&lt;/i&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you are a Linux user, you can set your CLASSPATH by typing this command from your Linux console (I assume your iReport installation directory is &lt;b&gt;/usr/local&lt;/b&gt;).&lt;/p&gt;
&lt;pre style="background-color:#000000;color:#FFFFFF;font-family:monospace"&gt;
export "CLASSPATH=.:/usr/local/iReport-2.0.4/lib/jasperreports-2.0.4.jar:\
 /usr/local/iReport-2.0.4/lib/commons-digester-1.7.jar:\
 /usr/local/iReport-2.0.4/lib/commons-logging-1.0.2.jar:\
 /usr/local/iReport-2.0.4/lib/commons-collections-2.1.jar:\
 /usr/local/iReport-2.0.4/lib/mysql-connector-java-3.1.11-bin.jar"
&lt;/pre&gt;
&lt;p&gt;But, if you are a Windows user, you can use &lt;b&gt;set CLASSPATH=&lt;i&gt;[your class path]&lt;/i&gt;&lt;/b&gt; from the command prompt utility.&lt;/p&gt;
&lt;b&gt;&lt;u&gt;Write Your Code&lt;/u&gt;&lt;/b&gt;
&lt;p&gt;Let's move on! Next step is writting your Java code. This code will call the report that we've made in the previous tutorial. To make it easier, I'll give you all the code so you can copy-paste and modify it if necessary. I named this file &lt;i&gt;viewReport.java&lt;/i&gt;, but you can use another name that you prefer.&lt;/p&gt;
&lt;textarea cols="75" rows="20"&gt;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import net.sf.jasperreports.view.*;
import net.sf.jasperreports.engine.*;
import java.sql.*;

public class viewReport extends JFrame implements ActionListener{
 JasperPrint JPrint;
 JButton btnShowReport;
 JButton btnAbout;
 JButton btnExit;
 // INITIALIZE GUI COMPONENTS
 public void initComponent(){
  btnShowReport=new JButton("SHOW REPORT");
  btnShowReport.setMnemonic('S');
  btnShowReport.addActionListener(this);

  btnAbout=new JButton("ABOUT");
  btnAbout.setMnemonic('A');
  btnAbout.addActionListener(this);

  btnExit=new JButton("EXIT");
  btnExit.setMnemonic('X');
  btnExit.addActionListener(this);
 }

 // DESIGN THE FORM
 public void design(){
  setTitle("View Report");
  getContentPane().setLayout(new FlowLayout());
  getContentPane().add(btnShowReport);
  getContentPane().add(btnAbout);
  getContentPane().add(btnExit);
  pack();
  setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  show();
 }

 // SHOW THE REPORT
 public void showReport(){
  try{
   // PREPARING DATABASE CONNECTION
   String jdbcDriver = "com.mysql.jdbc.Driver";
   Class.forName(jdbcDriver);
   String url = "jdbc:mysql://localhost/contact";
   String user = "user1";
   String pass = "12345";
 
   Connection con = DriverManager.getConnection(url, user, pass);

   // PATH TO YOUR JASPER FILE
   String fullPath="/home/lucky/Documents/Java/report/contact_report.jasper";
   // FILL THE REPORT
   JPrint=JasperFillManager.fillReport(fullPath,null,con);
   // VIEW THE REPORT
   JasperViewer.viewReport(JPrint,false);
  }
  catch(Exception ex){
   System.out.println(ex.toString());
  }
 }

 // CONTRUCTOR
 viewReport(){
  initComponent();
  design();
 }

 public static void main(String[] args){
  new viewReport();
 }

 // EVENT LISTENER
 public void actionPerformed(ActionEvent ae){
  // IF SHOW BUTTON CLICKED, SHOW THE REPORT
  if(ae.getSource()==btnShowReport)
   showReport();
  // THE OTHER BUTTONS
  if(ae.getSource()==btnExit)
   dispose();
  if(ae.getSource()==btnAbout)
   JOptionPane.showMessageDialog(this,"Jasper Report Viewer.\nCreated by: Lucky\nE-mail: lucky_iboyz@yahoo.com or bogeyman2007@gmail.com","About",JOptionPane.INFORMATION_MESSAGE);
 }
}
&lt;/textarea&gt;
&lt;br&gt;&lt;br&gt;
&lt;b&gt;&lt;u&gt;Execute It!&lt;/u&gt;&lt;/b&gt;
&lt;p&gt;Final step! Compile your Java file by typing &lt;b&gt;javac viewReport.java&lt;/b&gt;. After that, execute it with command &lt;b&gt;java viewReport&lt;/b&gt;. Before that, make sure your MySQL has started. And, after your program run, you can click on &lt;i&gt;&lt;u&gt;SHOW REPORT&lt;/u&gt;&lt;/i&gt; button to view the report.&lt;/p&gt;
&lt;p align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FUeZc98mol8/SfefDEEC3uI/AAAAAAAAAJw/2swK2AaFnb0/s1600-h/Image7.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 250px; height: 54px;" src="http://4.bp.blogspot.com/_FUeZc98mol8/SfefDEEC3uI/AAAAAAAAAJw/2swK2AaFnb0/s400/Image7.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5329903558995402466" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/Sfedu5suu3I/AAAAAAAAAJg/4FQZqiBgdTM/s1600-h/Image5.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 202px;" src="http://3.bp.blogspot.com/_FUeZc98mol8/Sfedu5suu3I/AAAAAAAAAJg/4FQZqiBgdTM/s400/Image5.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5329902113104247666" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-2760273660042817072?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/2760273660042817072/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=2760273660042817072' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/2760273660042817072'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/2760273660042817072'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2008/05/ireport-tutorial-part-3-calling-report.html' title='iReport Tutorial (part 3) - Calling Report From Java Application'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_FUeZc98mol8/SfefDEEC3uI/AAAAAAAAAJw/2swK2AaFnb0/s72-c/Image7.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-1556101318489019475</id><published>2008-02-04T19:18:00.000-08:00</published><updated>2009-04-28T17:25:05.109-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>iReport Tutorial (part 2) - Creating Your First Report</title><content type='html'>&lt;b&gt;&lt;u&gt;Designing The Database and Table&lt;/u&gt;&lt;/b&gt;
&lt;p&gt;After the iReport installation is completed, you can create your first report. Usually, a report need a data source, so we need a database. In this tutorial, I use MySQL database as the database. You must have MySQL installed on your computer to try this tutorial. I also recommend you learn the basic of MySQL first if you never use MySQL before.&lt;/p&gt;
&lt;p&gt;First, you have to create a new database and name it &lt;i&gt;&lt;u&gt;contact&lt;/u&gt;&lt;/i&gt;. Inside it, create the new table 
named &lt;i&gt;&lt;u&gt;contact&lt;/u&gt;&lt;/i&gt; with a structure like below.
&lt;table border="1" align="center"&gt;
&lt;tr bgcolor="#DDDDDD"&gt;&lt;th&gt;Field&lt;/th&gt;&lt;th&gt;Type&lt;/th&gt;&lt;th&gt;Length&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;id&lt;/td&gt;&lt;td&gt;int&lt;/td&gt;&lt;td&gt;4&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;name&lt;/td&gt;&lt;td&gt;varchar&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;phone&lt;/td&gt;&lt;td&gt;varchar&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;handphone&lt;/td&gt;&lt;td&gt;varchar&lt;/td&gt;&lt;td&gt;20&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;address&lt;/td&gt;&lt;td&gt;varchar&lt;/td&gt;&lt;td&gt;50&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;p&gt;After that, insert some records to the table. You can store your friends' name, address, and also their phone and cell phone number to the table.&lt;/p&gt;
&lt;b&gt;&lt;u&gt;Preparation&lt;/u&gt;&lt;/b&gt;
&lt;p&gt;The next steps are the preparation to design the report. We need to set the &lt;i&gt;&lt;u&gt;classpath&lt;/u&gt;&lt;/i&gt; and create the connection to MySQL. So, follow the instructions below.
&lt;dl&gt;
&lt;dt&gt;&lt;b&gt;1. Setting Classpath&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;We need to set the &lt;u&gt;&lt;i&gt;classpath&lt;/i&gt;&lt;/u&gt; which stores the driver for MySQL. Click on the &lt;i&gt;&lt;u&gt;Option&lt;/u&gt;&lt;/i&gt; menu and then click &lt;i&gt;&lt;u&gt;Classpath&lt;/u&gt;&lt;/i&gt;. After that click &lt;i&gt;&lt;u&gt;Add JAR&lt;/u&gt;&lt;/i&gt; on the dialog box, then choose the MySQL driver. You will find it inside the &lt;i&gt;&lt;u&gt;lib&lt;/u&gt;&lt;/i&gt; folder in your iReport installation directory and the file name is &lt;i&gt;&lt;u&gt;mysql-connector-java-3.1.11-bin.jar&lt;/u&gt;&lt;/i&gt;. The file name can be different from yours depend on its version. Then, click &lt;u&gt;&lt;i&gt;Save Classpath&lt;/i&gt;&lt;/u&gt; to save the configuration.&lt;/p&gt;
&lt;p align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/Sfedup_7dNI/AAAAAAAAAJA/q2PPetwkY54/s1600-h/Image1.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 350px; height: 221px;" src="http://3.bp.blogspot.com/_FUeZc98mol8/Sfedup_7dNI/AAAAAAAAAJA/q2PPetwkY54/s400/Image1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5329902108889806034" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;b&gt;2. Setting Up Database Connection&lt;/b&gt;&lt;/dt&gt;
&lt;dd&gt;
&lt;p&gt;To create a database connection, click &lt;i&gt;&lt;u&gt;Data&lt;/u&gt;&lt;/i&gt; menu, and then click &lt;i&gt;&lt;u&gt;New&lt;/u&gt;&lt;/i&gt; to create new connection. After that you have to determine the data source type. Choose &lt;i&gt;&lt;u&gt;Database JDBC Connection&lt;/u&gt;&lt;/i&gt;. Then click Next so a new dialog box will appear. Fill the text field just like the picture below, you have to specify &lt;i&gt;Connection Name&lt;/i&gt;, &lt;i&gt;JDBC Driver&lt;/i&gt;, and &lt;i&gt;JDBC URL&lt;/i&gt;. After that, enter the MySQL username and password according to your MySQL configuration and then click &lt;i&gt;&lt;u&gt;Test&lt;/u&gt;&lt;/i&gt; to test your configuration. If the connection test is success, click &lt;i&gt;&lt;u&gt;Save&lt;/u&gt;&lt;/i&gt; to save your configuration.&lt;/p&gt;
&lt;p align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FUeZc98mol8/SfedugiYyzI/AAAAAAAAAJI/eZOZCGDeGhU/s1600-h/Image2.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 341px; height: 400px;" src="http://4.bp.blogspot.com/_FUeZc98mol8/SfedugiYyzI/AAAAAAAAAJI/eZOZCGDeGhU/s400/Image2.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5329902106349980466" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;b&gt;&lt;u&gt;Designing The Report&lt;/u&gt;&lt;/b&gt;
&lt;p&gt;To begin designing the new report just click &lt;i&gt;&lt;u&gt;File&lt;/u&gt;&lt;/i&gt;, than click &lt;i&gt;&lt;u&gt;New&lt;/u&gt;&lt;/i&gt;. Now you will face a window which provide a page to design the report's layout. But before you start to design, you have to make a query to retrieve the fields from the table. Click on &lt;i&gt;&lt;u&gt;Data&lt;/u&gt;&lt;/i&gt; menu then choose &lt;i&gt;&lt;u&gt;Report Query&lt;/u&gt;&lt;/i&gt;. Type &lt;b&gt;SELECT * FROM contact&lt;/b&gt; in the text area. After that iReport will automatically retrieve the fields from the database according to your SQL command. Then click &lt;i&gt;&lt;u&gt;OK&lt;/u&gt;&lt;/i&gt;. For clearer information, look at the picture below.&lt;/p&gt;
&lt;p align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/SfeduqDXTxI/AAAAAAAAAJQ/9xqYKhgFBTo/s1600-h/Image3.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 275px;" src="http://3.bp.blogspot.com/_FUeZc98mol8/SfeduqDXTxI/AAAAAAAAAJQ/9xqYKhgFBTo/s400/Image3.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5329902108904214290" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;After all required fields retrieved, you can start to design the report's layout by dragging the fields from the Document Structure panel to the designer page. For example you can see the report design at the picture below.&lt;/p&gt;
&lt;p align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FUeZc98mol8/SfeduzFU1lI/AAAAAAAAAJY/3vp1s5Hy4EI/s1600-h/Image4.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_FUeZc98mol8/SfeduzFU1lI/AAAAAAAAAJY/3vp1s5Hy4EI/s400/Image4.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5329902111328360018" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;b&gt;&lt;u&gt;Run It!&lt;/u&gt;&lt;/b&gt;
&lt;p&gt;The last step is execute your report. Before you execute it, click on &lt;i&gt;&lt;u&gt;Option&lt;/u&gt;&lt;/i&gt; then click &lt;u&gt;&lt;i&gt;Settings&lt;/i&gt;&lt;/u&gt; and click &lt;u&gt;&lt;i&gt;Compiler&lt;/i&gt;&lt;/u&gt; tab. Give a checkmark to the &lt;i&gt;&lt;u&gt;Use Reports Directory to Compile&lt;/i&gt;&lt;/u&gt; option and uncheck the &lt;i&gt;&lt;u&gt;keep .java file (if available)&lt;/u&gt;&lt;/i&gt; option. Click &lt;i&gt;&lt;u&gt;Save&lt;/u&gt;&lt;/i&gt; to save your changes.&lt;/p&gt;
&lt;p align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FUeZc98mol8/SfeeTDNvW0I/AAAAAAAAAJo/nOV0ee7eaik/s1600-h/Image6.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 350px; height: 336px;" src="http://1.bp.blogspot.com/_FUeZc98mol8/SfeeTDNvW0I/AAAAAAAAAJo/nOV0ee7eaik/s400/Image6.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5329902734133910338" /&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;Now, you are ready to execute your report, but don't forget to save it first. Just click &lt;i&gt;&lt;u&gt;Build&lt;/u&gt;&lt;/i&gt;, then click &lt;i&gt;&lt;u&gt;Execute (with active connection)&lt;/u&gt;&lt;/i&gt; to execute it.&lt;/p&gt;
&lt;p align="center"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_FUeZc98mol8/Sfedu5suu3I/AAAAAAAAAJg/4FQZqiBgdTM/s1600-h/Image5.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 400px; height: 202px;" src="http://3.bp.blogspot.com/_FUeZc98mol8/Sfedu5suu3I/AAAAAAAAAJg/4FQZqiBgdTM/s400/Image5.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5329902113104247666" /&gt;&lt;/a&gt;
&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-1556101318489019475?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/1556101318489019475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=1556101318489019475' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/1556101318489019475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/1556101318489019475'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2008/02/ireport-tutorial-part-2-creating-your.html' title='iReport Tutorial (part 2) - Creating Your First Report'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_FUeZc98mol8/Sfedup_7dNI/AAAAAAAAAJA/q2PPetwkY54/s72-c/Image1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-5292441426071436277</id><published>2008-02-04T19:14:00.000-08:00</published><updated>2008-10-07T22:44:04.434-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>iReport Tutorial (part 1) - Installing iReport Designer</title><content type='html'>&lt;p&gt;iReport is a report designer tool for Java. You can download iReport Designer freely from &lt;a href="http://sourceforge.net/projects/ireport"&gt;sourceforge.net/projects/ireport&lt;/a&gt;. Before you install iReport (on Windows or Linux), The &lt;i&gt;&lt;u&gt;Java Development Kit&lt;/u&gt;&lt;/i&gt; (JDK) must be installed properly on your computer. Be sure that the JDK version that you are using is at least 1.5. Unless you can download the newer version of JDK from &lt;a href="http://java.sun.com" target="_blank"&gt;java.sun.com&lt;/a&gt;. Just for information, in this tutorial I used JDK 1.6 and iReport 2.0.4.&lt;/p&gt;
&lt;p&gt;To install iReport Designer you just need to extract the compressed iReport binary file to a specified folder (i.e &lt;i&gt;&lt;u&gt;C:\Program Files&lt;/u&gt;&lt;/i&gt; if you are using Windows or &lt;i&gt;&lt;u&gt;/usr/local&lt;/u&gt;&lt;/i&gt; if you are using Linux). When you're done, you will have a new folder named &lt;i&gt;&lt;u&gt;iReport-2.0.4&lt;/u&gt;&lt;/i&gt;. You folder name can be different from mine depend on the iReport version that you used. After that, you have to enter that new folder and double-click on &lt;i&gt;&lt;u&gt;iReport.bat&lt;/u&gt;&lt;/i&gt; file if you are using windows. But, if you are using Linux, you can double-click &lt;i&gt;&lt;u&gt;iReport.sh&lt;/u&gt;&lt;/i&gt; file. Or you can try another way by typing &lt;i&gt;&lt;u&gt;./iReport.sh&lt;/u&gt;&lt;/i&gt; on your Linux console (and don't forget that your current directory must be the iReport installation directory). If your iReport starts properly that means you have successfully installed iReport on your computer.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-5292441426071436277?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/5292441426071436277/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=5292441426071436277' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/5292441426071436277'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/5292441426071436277'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2008/02/ireport-tutorial-part-1-installing.html' title='iReport Tutorial (part 1) - Installing iReport Designer'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1635617418074704618.post-1592173116449255315</id><published>2007-09-11T18:41:00.000-07:00</published><updated>2008-10-07T22:41:16.333-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><title type='text'>How To Change Linux Bootsplash Screen</title><content type='html'>&lt;p&gt;Are you bored with your Linux Bootsplash Screen? Do you ever think how to change it? The first thing you have to do is download your preferred bootsplash screen from the internet. You can find it at &lt;a href="http://www.kde-look.org/"&gt;www.kde-look.org&lt;/a&gt;. I get some nice bootsplash screens there. But, before you download it please choose the bootsplash screen that suitable with your screen resolution.&lt;/p&gt;This tutorial only work with the Red Hat based distributions such as Fedora, Mandriva, or SuSE (I tested this tutorial on SuSE 10.0). If you are using Slackware or Debian based distributions I suggest you to find the other references.&lt;br/&gt;&lt;p&gt;Ok. Let's start...&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Open your terminal console and then type &lt;b&gt;su&lt;/b&gt; to switch to root user.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Copy your bootsplash file to &lt;b&gt;/etc/bootsplash/themes&lt;/b&gt;.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Extract your files (for example I have file named Aqua.tar.gz) by typing &lt;b&gt;tar -xvzf Aqua.tar.gz&lt;/b&gt; then you will find the new folder named &lt;b&gt;Aqua&lt;/b&gt; which will be your new theme's name.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Type &lt;b&gt;vi /etc/sysconfig/bootsplash&lt;/b&gt; to edit you bootsplash configuration.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Find the line &lt;b&gt;THEMES="your_old_bootsplash_theme"&lt;/b&gt; and then change it to &lt;b&gt;THEME="Aqua"&lt;/b&gt;. Then save this file by pressing &lt;b&gt;ESC : w q&lt;/b&gt; sequentially.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Type &lt;b&gt;mkinitrd -s 1024x768&lt;/b&gt;. The argument 1024x768 is screen resolution and you have to write the correct screen resolution.&lt;br/&gt;&lt;/li&gt;&lt;li&gt;Make sure these lines are exist in your GRUB configuration file (&lt;b&gt;/boot/grub/menu.lst&lt;/b&gt;) :&lt;/li&gt;&lt;i&gt;&lt;span&gt;&lt;span&gt;&lt;br/&gt;kernel (hd0,7)/boot/vmlinuz root=/dev/hda8 &lt;strong&gt;vga=791&lt;/strong&gt; splash=silent resume=/dev/hda9&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;initrd (hd0,7)/boot/initrd&lt;/i&gt;&lt;span&gt;&lt;span&gt;&lt;br/&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;span&gt;Look at the words printed in bold. Use &lt;strong&gt;vga=788&lt;/strong&gt; for 800x600 screen resolution or &lt;strong&gt;vga=791&lt;/strong&gt; for 1024x768 screen resolution. Don't forget to write splash=silent or your bootsplash won't appear.&lt;br/&gt;&lt;br/&gt;&lt;/span&gt;&lt;li&gt;&lt;span&gt;&lt;span&gt;Restart your linux and see if it works.&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;&lt;br/&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1635617418074704618-1592173116449255315?l=bogeyman2007.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://bogeyman2007.blogspot.com/feeds/1592173116449255315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1635617418074704618&amp;postID=1592173116449255315' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/1592173116449255315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1635617418074704618/posts/default/1592173116449255315'/><link rel='alternate' type='text/html' href='http://bogeyman2007.blogspot.com/2007/09/how-to-change-linux-bootsplash-screen.html' title='How To Change Linux Bootsplash Screen'/><author><name>Bogeyman</name><uri>http://www.blogger.com/profile/01140973591699845459</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
