<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>GunnaSatria</title>
	<atom:link href="http://gunnasatria.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://gunnasatria.wordpress.com</link>
	<description>learning by sharing</description>
	<lastBuildDate>Thu, 29 Dec 2011 10:58:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='gunnasatria.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>GunnaSatria</title>
		<link>http://gunnasatria.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://gunnasatria.wordpress.com/osd.xml" title="GunnaSatria" />
	<atom:link rel='hub' href='http://gunnasatria.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Simple JSP Part 4</title>
		<link>http://gunnasatria.wordpress.com/2008/10/07/simple-jsp-part-4/</link>
		<comments>http://gunnasatria.wordpress.com/2008/10/07/simple-jsp-part-4/#comments</comments>
		<pubDate>Tue, 07 Oct 2008 08:20:47 +0000</pubDate>
		<dc:creator>gunnasatria</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jsp]]></category>

		<guid isPermaLink="false">http://gunnasatria.wordpress.com/?p=33</guid>
		<description><![CDATA[As i promised a long.. long time ago..  i will write an example of using java beans in jsp pages. The idea of this scenario is so you as a java web developer not being mixed up between HTML scripts and Java scripts. So, if in the previous example we embedded some java instructions in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=33&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As i promised a long.. long time ago.. <br />
i will write an example of using java beans in jsp pages.<br />
The idea of this scenario is so you as a java web developer not being mixed up between HTML scripts and Java scripts.<br />
So, if in the previous example we embedded some java instructions in HTML scripts then for this tutorial we will separate both.</p>
<p>Supposed you have this usual Java class acting as our first created java beans. <br />
<em>package pages;</em></p>
<p><em>public class HelloWorld {<br />
</em></p>
<p><em>public String getMessage(){<br />
           return &#8220;Hello Word&#8221;;<br />
} </em></p>
<p><em>} </em></p>
<p>and then you have a regular HTML in a JSP file like below,</p>
<p>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Simple JSP Part 4&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>and let&#8217;s name it message.jsp</p>
<p>Now, the idea is to display message from our HelloWorld class to our jsp page. How we will do it?<br />
Add below java instruction between body tag in our message.jsp</p>
<p>&lt;%</p>
<p>pages.HelloWord hw = new pages.HelloWorld();<br />
out.println(&#8220;message is: &#8220;+hw.getMessage()); </p>
<p>%&gt;</p>
<p>To putting it all together, below is the full code.</p>
<p>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Simple JSP Part 4&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;</p>
<p><strong>&lt;%</strong></p>
<p><strong>pages.HelloWord hw = new pages.HelloWorld();<br />
out.println(&#8220;message is: &#8220;+hw.getMessage()); </strong></p>
<p><strong>%&gt;</strong></p>
<p>&lt;/body&gt;</p>
<p>&lt;/html&gt;</p>
<p>Then you will see a nice hello word message.<br />
This is just a tiny example of how usefull java beans will be. The other benefit is if separate our logic into our java class, then we will able to test it first and will not having much difficulties in debuging compared to when we join our java instructions in our jsp pages.<br />
But.. there is always a backside of this. If you want to update your java class, then you have to restart your web server to get it work.</p>
<p>So&#8230; have a nice try n error.</p><br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gunnasatria.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gunnasatria.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gunnasatria.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gunnasatria.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gunnasatria.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gunnasatria.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gunnasatria.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gunnasatria.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gunnasatria.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gunnasatria.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gunnasatria.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gunnasatria.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gunnasatria.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gunnasatria.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=33&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gunnasatria.wordpress.com/2008/10/07/simple-jsp-part-4/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3e8463073f5d0f0a89691fefd7abd40e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gunnasatria</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple JSP part 3</title>
		<link>http://gunnasatria.wordpress.com/2008/01/07/simple-jsp-part-3/</link>
		<comments>http://gunnasatria.wordpress.com/2008/01/07/simple-jsp-part-3/#comments</comments>
		<pubDate>Mon, 07 Jan 2008 02:12:53 +0000</pubDate>
		<dc:creator>gunnasatria</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jsp]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://gunnasatria.wordpress.com/2008/01/07/simple-jsp-part-3/</guid>
		<description><![CDATA[Now we are trying to connect our web application to a database. I use Northwind database here as an example database. For you who don&#8217;t know what Northwind is, it is a sample database given if you install MS Access. I am sorry for non Windows user, but if you follow below tutorial you should [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=30&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Now we are trying to connect our web application to a database. I use <b>Northwind</b> database here as an example database.<br />
For you who don&#8217;t know what Northwind is, it is a sample database given if you install MS Access. I am sorry for non Windows user, but if you follow below tutorial you should also do it in another database like MySQL or PostgreSQL.<br />
<span id="more-30"></span>Open your previous SimpleJSP project, create a new file under simplejsp folder and named it <b>employees.jsp</b>.<br />
What we are trying to do is to display all data from Employees table in Northwind database in our new employees.jsp page.</p>
<p><img src="http://gunnasatria.files.wordpress.com/2008/01/emptable.jpg?w=632" alt="Employees" /></p>
<p>Copy and paste below code,</p>
<p>&lt;%@ page import=&#8221;java.sql.*&#8221;%&gt;<br />
&lt;%@ page import=&#8221;java.util.*&#8221;%&gt;<br />
&lt;%<br />
List empList = new ArrayList();</p>
<p>Class.forName(&#8220;sun.jdbc.odbc.JdbcOdbcDriver&#8221;);<br />
Connection conn = DriverManager.getConnection(&#8220;jdbc:odbc:northwind&#8221;,&#8221;",&#8221;");<br />
Statement stmt = conn.createStatement();<br />
ResultSet rs = stmt.executeQuery(&#8220;select EmployeeId,LastName,FirstName,Title from Employees&#8221;);<br />
while(rs.next()){<br />
Map emp = new HashMap();<br />
emp.put(&#8220;id&#8221;,rs.getInt(1));<br />
emp.put(&#8220;firstname&#8221;,rs.getString(2));<br />
emp.put(&#8220;lastname&#8221;,rs.getString(3));<br />
emp.put(&#8220;title&#8221;,rs.getString(4));<br />
empList.add(emp);<br />
}<br />
rs.close();<br />
stmt.close();<br />
conn.close();<br />
%&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Employees&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;h1&gt;Employees&lt;/h1&gt;<br />
&lt;table border=&#8221;1&#8243;&gt;<br />
&lt;%<br />
for(int i=0;i&lt;empList.size();i++){<br />
Map emp = (Map)empList.get(i);<br />
%&gt;<br />
&lt;tr&gt;<br />
&lt;td align=&#8221;right&#8221;&gt;&lt;%=emp.get(&#8220;id&#8221;)%&gt;&lt;/td&gt;&lt;td&gt;&lt;%=emp.get(&#8220;lastname&#8221;)%&gt;&lt;/td&gt;&lt;td&gt;&lt;%=emp.get(&#8220;firstname&#8221;)%&gt;&lt;/td&gt;&lt;td&gt;&lt;%=emp.get(&#8220;title&#8221;)%&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;%<br />
}<br />
%&gt;<br />
&lt;/table&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>Before you try our new page, make sure to check your odbc whether it&#8217;s already had northwind DSN. Check it in ODBC Administrator.</p>
<p><img src="http://gunnasatria.files.wordpress.com/2008/01/odbc.jpg?w=632" alt="ODBC Config" /></p>
<p>If you doesn&#8217;t have it yet, create a new DSN, name it <b>northwind </b>and select Northwind.mdb file. If DSN already configured then start your jetty and go to <a href="http://localhost:8080/employees.jsp" rel="nofollow">http://localhost:8080/employees.jsp</a></p>
<p>You should get something like this,</p>
<h1>Employees</h1>
<table border="1">
<tr>
<td align="right">1</td>
<td>Nancy</td>
<td>Davolio</td>
<td>Sales Representative</td>
</tr>
<tr>
<td align="right">2</td>
<td>Andrew</td>
<td>Fuller</td>
<td>Vice President, Sales</td>
</tr>
<tr>
<td align="right">3</td>
<td>Janet</td>
<td>Leverling</td>
<td>Sales Representative</td>
</tr>
<tr>
<td align="right">4</td>
<td>Margaret</td>
<td>Peacock</td>
<td>Sales Representative</td>
</tr>
<tr>
<td align="right">5</td>
<td>Steven</td>
<td>Buchanan</td>
<td>Sales Manager</td>
</tr>
<tr>
<td align="right">6</td>
<td>Michael</td>
<td>Suyama</td>
<td>Sales Representative</td>
</tr>
<tr>
<td align="right">7</td>
<td>Robert</td>
<td>King</td>
<td>Sales Representative</td>
</tr>
<tr>
<td align="right">8</td>
<td>Laura</td>
<td>Callahan</td>
<td>Inside Sales Coordinator</td>
</tr>
<tr>
<td align="right">9</td>
<td>Anne</td>
<td>Dodsworth</td>
<td>Sales Representative</td>
</tr>
</table>
<p>Let&#8217;s break down our code to figure out what is all about..</p>
<p><b>1. Import package</b><br />
<i>&lt;%@ page import=&#8221;java.sql.*&#8221;%&gt;<br />
&lt;%@ page import=&#8221;java.util.*&#8221;%&gt;</i><br />
Above code means that we are importing all Classes that are under java.sql and java.util.<br />
java.sql package contains classes that are used to connect to database while java.util package contains class that are usefull as data holder like List and Vector.</p>
<p><b>2. Create Connection</b><br />
<i>Class.forName(&#8220;sun.jdbc.odbc.JdbcOdbcDriver&#8221;);</i><br />
Because we are using MS Access, so we are using  sun.jdbc.odbc.JdbcOdbcDriver class as java driver for ODBC database.<br />
If you are using other type of database, you must change it to appropriate driver class.</p>
<p><i>Connection conn = DriverManager.getConnection(&#8220;jdbc:odbc:northwind&#8221;,&#8221;",&#8221;"); </i><br />
First parameter in DriverManager.getConnection is our database URL, the second one is user that is allowed to access the database, and the third is the password.</p>
<p><b>3. Fetch Data</b><br />
<i>Statement stmt = conn.createStatement();<br />
ResultSet rs = stmt.executeQuery(&#8220;select EmployeeId,LastName,FirstName,Title from Employees&#8221;);<br />
while(rs.next()){<br />
Map emp = new HashMap();<br />
emp.put(&#8220;id&#8221;,rs.getInt(1));<br />
emp.put(&#8220;firstname&#8221;,rs.getString(2));<br />
emp.put(&#8220;lastname&#8221;,rs.getString(3));<br />
emp.put(&#8220;title&#8221;,rs.getString(4));<br />
empList.add(emp);<br />
}</i><br />
To execute the SQL query, we must create Statement object first.  From Statement object we can create ResultSet object that will hold our query result. As you can see that ResultSet rs hold &#8220;select EmployeeId,LastName,FirstName,Title from Employees&#8221; SQL query result. The rest of the code is just to set result data in a map for s single row and List for the whole data.</p>
<p><b>4. Close connection</b><br />
<i> rs.close();<br />
stmt.close();<br />
conn.close();</i><br />
Don&#8217;t forget to always close all of your connection object after you done with your database operation.</p>
<p><b>5. Display fetched Data</b><br />
<i>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Employees&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;h1&gt;Employees&lt;/h1&gt;<br />
&lt;table border=&#8221;1&#8243;&gt;<br />
&lt;%<br />
for(int i=0;i&lt;empList.size();i++){<br />
Map emp = (Map)empList.get(i);<br />
%&gt;<br />
&lt;tr&gt;<br />
&lt;td align=&#8221;right&#8221;&gt;&lt;%=emp.get(&#8220;id&#8221;)%&gt;&lt;/td&gt;&lt;td&gt;&lt;%=emp.get(&#8220;lastname&#8221;)%&gt;&lt;/td&gt;&lt;td&gt;&lt;%=emp.get(&#8220;firstname&#8221;)%&gt;&lt;/td&gt;&lt;td&gt;&lt;%=emp.get(&#8220;title&#8221;)%&gt;&lt;/td&gt;<br />
&lt;/tr&gt;<br />
&lt;%<br />
}<br />
%&gt;<br />
&lt;/table&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</i></p>
<p>Here we just use a simple table component from HTML to display our fetched data.</p>
<p>That&#8217;s all for now. Next tutorial will be JSP + Beans.<br />
Thanks</p><br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gunnasatria.wordpress.com/30/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gunnasatria.wordpress.com/30/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gunnasatria.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gunnasatria.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gunnasatria.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gunnasatria.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gunnasatria.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gunnasatria.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gunnasatria.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gunnasatria.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gunnasatria.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gunnasatria.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gunnasatria.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gunnasatria.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gunnasatria.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gunnasatria.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=30&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gunnasatria.wordpress.com/2008/01/07/simple-jsp-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3e8463073f5d0f0a89691fefd7abd40e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gunnasatria</media:title>
		</media:content>

		<media:content url="http://gunnasatria.files.wordpress.com/2008/01/emptable.jpg" medium="image">
			<media:title type="html">Employees</media:title>
		</media:content>

		<media:content url="http://gunnasatria.files.wordpress.com/2008/01/odbc.jpg" medium="image">
			<media:title type="html">ODBC Config</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple JSP part 2</title>
		<link>http://gunnasatria.wordpress.com/2008/01/05/simple-jsp-part-2/</link>
		<comments>http://gunnasatria.wordpress.com/2008/01/05/simple-jsp-part-2/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 09:09:19 +0000</pubDate>
		<dc:creator>gunnasatria</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jsp]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://gunnasatria.wordpress.com/2008/01/05/simple-jsp-part-2/</guid>
		<description><![CDATA[Our next tutorial is about handling user input. We will start with the most common input component which is text field. Open your index.jsp and add new codes like below, &#60;% out.println(&#8220;hello world&#8221;); %&#62; &#60;html&#62; &#60;head&#62; &#60;title&#62;SimpleJSP&#60;/title&#62; &#60;/head&#62; &#60;body&#62; &#60;form&#62; &#60;input type=&#8221;text&#8221; name=&#8221;username&#8221; maxlength=&#8221;20&#8243; size=&#8221;10&#8243;/&#62; &#60;input type=&#8221;submit&#8221; value=&#8221;Login&#8221;/&#62; &#60;/form&#62; &#60;/body&#62; &#60;/html&#62; Run your jetty and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=27&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Our next tutorial is about handling user input. We will start with the most common input component which is text field.<br />
Open your index.jsp and add new codes like below,<span id="more-27"></span><br />
&lt;%<br />
out.println(&#8220;hello world&#8221;);<br />
%&gt;<br />
<b>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;SimpleJSP&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;form&gt;<br />
&lt;input type=&#8221;text&#8221; name=&#8221;username&#8221; maxlength=&#8221;20&#8243; size=&#8221;10&#8243;/&gt;<br />
&lt;input type=&#8221;submit&#8221; value=&#8221;Login&#8221;/&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</b></p>
<p>Run your jetty and open index.jsp. You will see something like below, one text field with maximum input of 20 character with one Login button.<br />
<img src="http://gunnasatria.files.wordpress.com/2008/01/logina.jpg?w=632" alt="Plain Login Form" /><br />
Right now, if you type anything and press the button it will do nothing. Let&#8217;s change our code a little..</p>
<p>&lt;%<br />
<b>String usernameInput = request.getParameter(&#8220;username&#8221;);<br />
if(null!=usernameInput){<br />
out.println(&#8220;hello &#8220;+usernameInput);<br />
}else{<br />
</b> out.println(&#8220;hello world&#8221;);<b><br />
}</b><br />
%&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;SimpleJSP&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;form&gt;<br />
&lt;input type=&#8221;text&#8221; name=&#8221;username&#8221; maxlength=&#8221;20&#8243; size=&#8221;10&#8243;/&gt;<br />
&lt;input type=&#8221;submit&#8221; value=&#8221;Login&#8221;/&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>Refresh your index.jsp and try type any text in your text field and press Login.. do you see some changing??<br />
What you type will show in the hello text.</p>
<p><img src="http://gunnasatria.files.wordpress.com/2008/01/loginb.jpg?w=632" alt="Input Test" /></p>
<p>You notice that in the latest code, there is one line that capture value from username text field which is <b>request.getParameter(&#8220;username&#8221;)</b>. So, just use this syntax to capture any html input component by changing the parameter input in request.getParameter.<br />
This is the code if we want to have some login page.<br />
&lt;%<br />
String usernameInput = request.getParameter(&#8220;username&#8221;);<br />
String passwordInput = request.getParameter(&#8220;password&#8221;);<br />
if(null!=usernameInput &amp;&amp; null!=passwordInput ){<br />
out.println(&#8220;process user with username=&#8221;+usernameInput+&#8221; and password = &#8220;+passwordInput);<br />
}else{<br />
out.println(&#8220;hello world&#8221;);<br />
}<br />
%&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;SimpleJSP&lt;/title&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;form&gt;<br />
Name:&lt;input type=&#8221;text&#8221; name=&#8221;username&#8221; maxlength=&#8221;20&#8243; size=&#8221;10&#8243;/&gt;&lt;br/&gt;<br />
Password:&lt;input type=&#8221;password&#8221; name=&#8221;password&#8221; maxlength=&#8221;20&#8243; size=&#8221;10&#8243;/&gt;&lt;br/&gt;<br />
&lt;input type=&#8221;submit&#8221; value=&#8221;Login&#8221;/&gt;<br />
&lt;/form&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p>
<p>The next tutorial will be connection to database.<br />
Thanks</p><br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gunnasatria.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gunnasatria.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gunnasatria.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gunnasatria.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gunnasatria.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gunnasatria.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gunnasatria.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gunnasatria.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gunnasatria.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gunnasatria.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gunnasatria.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gunnasatria.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gunnasatria.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gunnasatria.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gunnasatria.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gunnasatria.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=27&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gunnasatria.wordpress.com/2008/01/05/simple-jsp-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3e8463073f5d0f0a89691fefd7abd40e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gunnasatria</media:title>
		</media:content>

		<media:content url="http://gunnasatria.files.wordpress.com/2008/01/logina.jpg" medium="image">
			<media:title type="html">Plain Login Form</media:title>
		</media:content>

		<media:content url="http://gunnasatria.files.wordpress.com/2008/01/loginb.jpg" medium="image">
			<media:title type="html">Input Test</media:title>
		</media:content>
	</item>
		<item>
		<title>Simple JSP part 1</title>
		<link>http://gunnasatria.wordpress.com/2008/01/04/simple-jsp-part-1/</link>
		<comments>http://gunnasatria.wordpress.com/2008/01/04/simple-jsp-part-1/#comments</comments>
		<pubDate>Fri, 04 Jan 2008 13:32:01 +0000</pubDate>
		<dc:creator>gunnasatria</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[jsp]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://gunnasatria.wordpress.com/2008/01/04/simple-jsp-part-1/</guid>
		<description><![CDATA[This post is dedicated for you who want to start learning how to create a web application using Java using only simple JSP. I assumed here you already have Java basic knowledge. Please enjoy. First thing in creating a web application is an editor. I recommend you use Eclipse. This is a powerful and free [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=16&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This post is dedicated for you who want to start learning how to create a web application using Java using only simple JSP. I assumed here you already have Java basic knowledge. Please enjoy.<span id="more-16"></span><br />
First thing in creating a web application is an editor. I recommend you use <a href="http://www.eclipse.org/" target="_blank" title="Eclipse">Eclipse</a>. This is a powerful and free editor with a lot of plug-ins support. And you may want to add <a href="http://jettylauncher.sourceforge.net/" title="Jetty Launcher" target="_blank">Jetty Launcher</a> plug in to help you continue with this tutorial.<br />
Second, you need<a href="http://java.sun.com/" target="_blank" title="Java Sun"> JDK</a>(Java Development Kit) use 1.4 version or 1.5, but in here i will use 1.5<br />
Last, you need a servlet container. This is a program that our web application will run in it. You can choose <a href="http://tomcat.apache.org/" target="_blank" title="Jakarta Tomcat">Tomcat</a> or <a href="http://www.mortbay.org" target="_blank" title="Jetty">Jetty</a>. I use Jetty,a light weight container.<br />
If you already have all requirements then we will start coding.</p>
<p>Create a new Java project in Eclipse, call it <b>SimpleJSP</b> and set your output folder to <b>simplejsp/WEB-INF/classes</b>.<br />
<img src="http://gunnasatria.files.wordpress.com/2008/01/buildpath.jpg?w=505&#038;h=693" alt="Set your output folder" height="693" width="505" /></p>
<p>Create a new file in WEB-INF folder and named it <b>web.xml</b>. Paste this below code,</p>
<p>&lt;?xml&#8221;&gt;version = &#8220;1.0&#8243; encoding = &#8220;utf-8&#8243;?&gt;<br />
&lt;web-app&gt;<br />
&lt;description&gt;Simple JSP Application&lt;/description&gt;<br />
&lt;session-config&gt;<br />
&lt;session-timeout&gt;30&lt;/session-timeout&gt;<br />
&lt;/session-config&gt;<br />
&lt;mime-mapping&gt;<br />
&lt;extension&gt;html&lt;/extension&gt;<br />
&lt;mime-type&gt;text/html&lt;/mime-type&gt;<br />
&lt;/mime-mapping&gt;<br />
&lt;mime-mapping&gt;<br />
&lt;extension&gt;txt&lt;/extension&gt;<br />
&lt;mime-type&gt;text/plain&lt;/mime-type&gt;<br />
&lt;/mime-mapping&gt;<br />
&lt;welcome-file-list&gt;<br />
&lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;<br />
&lt;welcome-file&gt;index.html&lt;/welcome-file&gt;<br />
&lt;/welcome-file-list&gt;<br />
&lt;/web-app&gt;</p>
<p>After that create new file<b> index.jsp</b> in<b> simplejsp</b> folder and type below code,</p>
<p>&lt;%<br />
out.println(&#8220;hello world&#8221;);<br />
%&gt;</p>
<p>One thing you must remember is, all code in your page that is between <b>&lt;%</b> and <b>%&gt;</b> will be take it as a Java code, so if you want to write a HTML tag inside &lt;%%&gt; then you must use out.println syntax. But if it&#8217;s outside the &lt;%%&gt; then you can just type the HTML tag like the usual HTML page.</p>
<p>Below image is what your project will look like,</p>
<p><img src="http://gunnasatria.files.wordpress.com/2008/01/indexjsp.jpg?w=632" alt="Project Look" /><br />
Now we will try to run our web application. Choose <b>Run</b> menu and click <b>Open Run Dialog</b>, configure Project, Jetty Home, web root dir. You can see in picture below as an example.</p>
<p><img src="http://gunnasatria.files.wordpress.com/2008/01/jettyconfig1.jpg?w=632" alt="Jetty Config" /></p>
<p>Click run, open your browser and type <a href="http://localhost:8080/index.jsp">http://localhost:8080/index.jsp</a><br />
I predict this will be your output,<br />
<img src="http://gunnasatria.files.wordpress.com/2008/01/unablecompile.jpg?w=632" alt="unablecompile" /><br />
Don&#8217;t worry.. i know this will happen. It is because we need to link <b>tools.jar</b> file from jdk so eclipse can compile our jsp file.<br />
Right click in your project and choose <b>Build Path-&gt;Add External Archieve</b> then select your tools.jar file, it is located in your [jdk home]\lib folder</p>
<p><img src="http://gunnasatria.files.wordpress.com/2008/01/externallink.jpg?w=632" alt="External Link" /></p>
<p>After that restart your Jetty, and refresh the index.jsp page.. voilla..Congratulations you already create your first jsp page.</p>
<p><img src="http://gunnasatria.files.wordpress.com/2008/01/firstpage1.jpg?w=632" alt="First Page" /><br />
In the next post, we will continue with handling user input.<br />
Thanks.</p><br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gunnasatria.wordpress.com/16/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gunnasatria.wordpress.com/16/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gunnasatria.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gunnasatria.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gunnasatria.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gunnasatria.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gunnasatria.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gunnasatria.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gunnasatria.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gunnasatria.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gunnasatria.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gunnasatria.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gunnasatria.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gunnasatria.wordpress.com/16/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gunnasatria.wordpress.com/16/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gunnasatria.wordpress.com/16/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=16&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gunnasatria.wordpress.com/2008/01/04/simple-jsp-part-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3e8463073f5d0f0a89691fefd7abd40e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gunnasatria</media:title>
		</media:content>

		<media:content url="http://gunnasatria.files.wordpress.com/2008/01/buildpath.jpg" medium="image">
			<media:title type="html">Set your output folder</media:title>
		</media:content>

		<media:content url="http://gunnasatria.files.wordpress.com/2008/01/indexjsp.jpg" medium="image">
			<media:title type="html">Project Look</media:title>
		</media:content>

		<media:content url="http://gunnasatria.files.wordpress.com/2008/01/jettyconfig1.jpg" medium="image">
			<media:title type="html">Jetty Config</media:title>
		</media:content>

		<media:content url="http://gunnasatria.files.wordpress.com/2008/01/unablecompile.jpg" medium="image">
			<media:title type="html">unablecompile</media:title>
		</media:content>

		<media:content url="http://gunnasatria.files.wordpress.com/2008/01/externallink.jpg" medium="image">
			<media:title type="html">External Link</media:title>
		</media:content>

		<media:content url="http://gunnasatria.files.wordpress.com/2008/01/firstpage1.jpg" medium="image">
			<media:title type="html">First Page</media:title>
		</media:content>
	</item>
		<item>
		<title>Create Virtual Host Name using Apache</title>
		<link>http://gunnasatria.wordpress.com/2007/12/13/create-virtual-host-name-using-apache/</link>
		<comments>http://gunnasatria.wordpress.com/2007/12/13/create-virtual-host-name-using-apache/#comments</comments>
		<pubDate>Thu, 13 Dec 2007 13:07:25 +0000</pubDate>
		<dc:creator>gunnasatria</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gunnasatria.wordpress.com/2007/12/13/create-virtual-host-name-using-apache/</guid>
		<description><![CDATA[Suppose you have a web application running on Apache and you want to change the url address of your application to be more friendly like http://www.gunnasatria.com All you have to do is to create a virtual host name. Edit your httpd.conf file, usually it&#8217;s located in conf folder and add the lines NameVirtualHost [your server [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=15&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Suppose you have a web application running on Apache and you want to change the url address of your application to be more friendly like <a href="http://www.gunnasatria.com/">http://www.gunnasatria.com</a><br />
All you have to do is to create a virtual host name.</p>
<p><span id="more-15"></span><br />
Edit your httpd.conf file, usually it&#8217;s located in conf folder and add the lines</p>
<p>NameVirtualHost [your server ip]:[active port]<br />
&lt;VirtualHost [your server ip]:[active port]&gt;<br />
ServerName <a href="http://www.gunnasatria.com/">http://www.gunnasatria.com</a><br />
DocumentRoot [folder point to your web app] <br />
&lt;/VirtualHost&gt;</p>
<p>Then restart your apache service.<br />
But this is not the only step, you must add the new url to your DNS to point to your server IP. So every request for the new url points to your server IP.</p>
<p>Good Luck</p><br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gunnasatria.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gunnasatria.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gunnasatria.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gunnasatria.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gunnasatria.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gunnasatria.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gunnasatria.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gunnasatria.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gunnasatria.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gunnasatria.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gunnasatria.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gunnasatria.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gunnasatria.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gunnasatria.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gunnasatria.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gunnasatria.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=15&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gunnasatria.wordpress.com/2007/12/13/create-virtual-host-name-using-apache/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3e8463073f5d0f0a89691fefd7abd40e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gunnasatria</media:title>
		</media:content>
	</item>
		<item>
		<title>Hibernate Annotation Tutorial</title>
		<link>http://gunnasatria.wordpress.com/2007/11/19/hibernate-annotation-tutorial/</link>
		<comments>http://gunnasatria.wordpress.com/2007/11/19/hibernate-annotation-tutorial/#comments</comments>
		<pubDate>Mon, 19 Nov 2007 13:33:18 +0000</pubDate>
		<dc:creator>gunnasatria</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://gunnasatria.wordpress.com/2007/11/19/hibernate-annotation-tutorial/</guid>
		<description><![CDATA[As in my previous post, right now i&#8217;m working on a project that use Hibernate annotation. I feel great and really believe that i am making a right choice. So, i want to share my experience using it here. Suppose you have one simple Table called Unit. Unit has 4 field ID,NAME,CREATE_BY and LOCATION. First, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=14&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As in my previous post, right now i&#8217;m working on a project that use Hibernate annotation. I feel great and really believe that i am making a right choice. So, i want to share my experience using it here.<span id="more-14"></span></p>
<p>Suppose you have one simple Table called <strong>Unit</strong>.<br />
Unit has 4 field ID,NAME,CREATE_BY and LOCATION.<br />
First, is create a hibernate configuration file hibernate.cfg.xml</p>
<p>&lt;?xml version=&#8217;1.0&#8242; encoding=&#8217;utf-8&#8242;?&gt;<br />
&lt;!DOCTYPE hibernate-configuration PUBLIC<br />
&#8220;-//Hibernate/Hibernate Configuration DTD 3.0//EN&#8221;<br />
&#8220;<a href="http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd&#8221;&gt;" rel="nofollow">http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd&#8221;&gt;</a><br />
&lt;hibernate-configuration&gt;<br />
&lt;session-factory&gt;<br />
&lt;!&#8211; Database connection settings &#8211;&gt;<br />
&lt;property name=&#8221;connection.driver_class&#8221;&gt;[driver]&lt;/property&gt;<br />
&lt;property name=&#8221;connection.url&#8221;&gt;[url]&lt;/property&gt;<br />
&lt;property name=&#8221;connection.username&#8221;&gt;[username]&lt;/property&gt;<br />
&lt;property name=&#8221;connection.password&#8221;&gt;[password]&lt;/property&gt;<br />
&lt;!&#8211; JDBC connection pool (use the built-in) &#8211;&gt;<br />
&lt;property name=&#8221;connection.pool_size&#8221;&gt;1&lt;/property&gt;<br />
&lt;!&#8211; SQL dialect &#8211;&gt;<br />
&lt;property name=&#8221;dialect&#8221;&gt;org.hibernate.dialect.OracleDialect&lt;/property&gt;<br />
&lt;!&#8211; Enable Hibernate&#8217;s automatic session context management &#8211;&gt;<br />
&lt;property name=&#8221;current_session_context_class&#8221;&gt;thread&lt;/property&gt;<br />
&lt;!&#8211; Disable the second-level cache &#8211;&gt;<br />
&lt;property name=&#8221;cache.provider_class&#8221;&gt;org.hibernate.cache.NoCacheProvider&lt;/property&gt;<br />
&lt;!&#8211; Echo all executed SQL to stdout &#8211;&gt;<br />
&lt;property name=&#8221;show_sql&#8221;&gt;true&lt;/property&gt;<br />
&lt;!&#8211; Drop and re-create the database schema on startup &#8211;&gt;<br />
&lt;property name=&#8221;hbm2ddl.auto&#8221;&gt;none&lt;/property&gt;<br />
&lt;mapping class=&#8221;com.vico.vems.beans.Unit&#8221;/&gt;<br />
&lt;/session-factory&gt;<br />
&lt;/hibernate-configuration&gt;</p>
<p>Next,you create pojo class to map the table.<br />
*updated 24-June-2011 thanks to Giri</p>
<p>@Entity<br />
@Table(name=&#8221;UNITS_PER_ASSET&#8221;)</p>
<p>public class Unit {<br />
private Integer id;<br />
private String name;<br />
private String createBy;<br />
private String location;</p>
<p>public Unit(){}</p>
<p>@Column(name=&#8221;CREATE_BY&#8221;)<br />
public String getCreateBy() {<br />
return createBy;<br />
}</p>
<p>public void setCreateBy(String createBy) {<br />
this.createBy = createBy;<br />
}</p>
<p>@Id<br />
@GeneratedValue(strategy=GenerationType.SEQUENCE, generator = &#8220;SEQ_UNIT&#8221;)<br />
@SequenceGenerator(name=&#8221;SEQ_UNIT&#8221;, sequenceName = &#8220;SEQ_UNIT&#8221;)<br />
@Column(name=&#8221;ID&#8221;)<br />
public Integer getId() {<br />
return id;<br />
}</p>
<p>public void setId(Integer id) {<br />
this.id = id;<br />
}</p>
<p>@Column(name=&#8221;LOCATION_ID&#8221;)<br />
public String getLocation() {<br />
return location;<br />
}</p>
<p>public void setLocation(String location) {<br />
this.location = location;<br />
}</p>
<p>@Column(name=&#8221;NAME&#8221;)<br />
public String getName() {<br />
return name;<br />
}</p>
<p>public void setName(String name) {<br />
this.name = name;<br />
}</p>
<p>}</p>
<p>Remember, all annotation is from javax.persistence.* and not from org.hibernate.*<br />
Little explanation,<br />
@Entity is always used if you want the class to be recognize by hibernate<br />
@Table is used when your class name isn&#8217;t the same with your table name<br />
@Id is always used because hibernate think this is a mandatory<br />
@Column is used if your field variable differ than your field column</p>
<p>Here i use @GeneratedValue because i had a sequence in my table to fill my ID column.</p>
<p>Next is to create simple class to test save and load method.<br />
public class HibernateTest {<br />
private static final Logger logger = Logger.getLogger(HibernateTest.class);<br />
public static void main(String[] args){<br />
AnnotationConfiguration ac = new AnnotationConfiguration();<br />
Session session = ac.configure().buildSessionFactory().openSession();</p>
<p>List&lt;Unit&gt; list = new ArrayList&lt;Unit&gt;();</p>
<p>Transaction tx = session.beginTransaction();<br />
for(int i=0;i&lt;10;i++){<br />
Unit u = new Unit();<br />
u.setId((i+50000));<br />
u.setName(&#8220;@&#8221;+i);<br />
u.setLocation(&#8220;Badak&#8221;);<br />
u.setCreateBy(&#8220;12345&#8243;);<br />
session.save(u);<br />
}<br />
session.flush();<br />
tx.commit();</p>
<p>list = session.createQuery(&#8220;from Unit u where u.location=:loc and u.name like &#8216;@%&#8217;&#8221;)<br />
.setString(&#8220;loc&#8221;, &#8220;Badak&#8221;)<br />
.list();</p>
<p>logger.debug(&#8220;list size = &#8220;+list.size());<br />
for (Unit object : list) {<br />
logger.debug(&#8220;Unit = &#8220;+object.getName());<br />
}<br />
}<br />
}</p><br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gunnasatria.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gunnasatria.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gunnasatria.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gunnasatria.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gunnasatria.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gunnasatria.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gunnasatria.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gunnasatria.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gunnasatria.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gunnasatria.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gunnasatria.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gunnasatria.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gunnasatria.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gunnasatria.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gunnasatria.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gunnasatria.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=14&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gunnasatria.wordpress.com/2007/11/19/hibernate-annotation-tutorial/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3e8463073f5d0f0a89691fefd7abd40e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gunnasatria</media:title>
		</media:content>
	</item>
		<item>
		<title>What to choose?</title>
		<link>http://gunnasatria.wordpress.com/2007/10/30/what-to-choose/</link>
		<comments>http://gunnasatria.wordpress.com/2007/10/30/what-to-choose/#comments</comments>
		<pubDate>Tue, 30 Oct 2007 14:19:57 +0000</pubDate>
		<dc:creator>gunnasatria</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://gunnasatria.wordpress.com/2007/10/30/what-to-choose/</guid>
		<description><![CDATA[I am now in the phase of design and analysis of a software project. So i have to choose what should i use in this project. For the presentation layer my candidates are Tapestry 3.0.3(because i don&#8217;t want to use Tap 5 who is still in alpha), ZeroKode (based from my recent experience) and Webwork [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=13&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am now in the phase of design and analysis of a software project. So i have to choose what should i use in this project.<br />
For the presentation layer my candidates are Tapestry 3.0.3(because i don&#8217;t want to use Tap 5 who is <strong>still</strong> in alpha), ZeroKode (based from my recent experience) and Webwork (which i use in my last project).<span id="more-13"></span><br />
I try ZK in the first place, and after a while i decide not to use it because of my lack of experience with this framework and the fact that i am working this project with my co-worker who only familiar with Tapestry, so goes out ZK. And without considering Webwork for the same reason, i choose Tapestry.<br />
I use Spring as the middle layer to manage the beans. Because&#8230; it&#8217;s a clear choice <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
Last is to choose the DAO layer.<br />
The options are Hibernate, Ibatis or just simple JDBC. It&#8217;s a hard choice, i want a powerful tool but i don&#8217;t want to write too much of xmls, Tapestry 3 already have much xml to write.<br />
I almost choose JDBC as my DAO layer, but then i read something in Spring 2 in Action.</p>
<p><em>&#8230;When we were kids, riding a bike was fun, wasn’t it? We would ride to school in the<br />
mornings. When school let out, we would cruise to our best friend’s house. When<br />
it got late and our parents were yelling at us for staying out past dark, we would<br />
peddle home for the night. Gee, those days were fun.<br />
Then we grew up and we needed more than a bike. Sometimes we have to<br />
travel quite a distance to work. Groceries have to be hauled, and ours kids need to<br />
get to soccer practice. And if you live in Texas, air-conditioning is a must! Our<br />
needs have simply outgrown our bike.<br />
JDBC is the bike of the persistence world. It is great for what it does, and for<br />
some jobs it works just fine. But as our applications become more complex, so do<br />
our persistence requirements. We need to be able to map object properties to<br />
database columns and have our statements and queries created for us, freeing us<br />
from typing an endless string of question marks&#8230;<br />
</em><br />
So<em> </em>finally i see the option, <u><strong>Hibernate 3 with Annotation</strong></u>. Powerful tool yet less xml.<br />
May all the choices were right and i can complete my project in 9 week.</p>
<p class="poweredbyperformancing">Powered by <a href="http://scribefire.com/">ScribeFire</a>.</p><br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gunnasatria.wordpress.com/13/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gunnasatria.wordpress.com/13/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gunnasatria.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gunnasatria.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gunnasatria.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gunnasatria.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gunnasatria.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gunnasatria.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gunnasatria.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gunnasatria.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gunnasatria.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gunnasatria.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gunnasatria.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gunnasatria.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gunnasatria.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gunnasatria.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=13&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gunnasatria.wordpress.com/2007/10/30/what-to-choose/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3e8463073f5d0f0a89691fefd7abd40e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gunnasatria</media:title>
		</media:content>
	</item>
		<item>
		<title>(Not) Simple JSF+Spring</title>
		<link>http://gunnasatria.wordpress.com/2007/10/22/not-simple-jsfspring/</link>
		<comments>http://gunnasatria.wordpress.com/2007/10/22/not-simple-jsfspring/#comments</comments>
		<pubDate>Mon, 22 Oct 2007 14:14:20 +0000</pubDate>
		<dc:creator>gunnasatria</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://gunnasatria.wordpress.com/2007/10/22/not-simple-jsfspring/</guid>
		<description><![CDATA[I don&#8217;t know why but suddenly i want to take a look of this framework. So, i search some jsf tutorial and download jsf distribution framework (jsf 1.2) . I create a simple hello world project using my eclipse ide after following instruction from the tutorial i found. try running it using jetty 5 and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=12&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know why but suddenly i want to take a look of this framework. So, i search some jsf tutorial and download jsf distribution framework (jsf 1.2) . I create a simple hello world project using my eclipse ide after following instruction from the <a href="http://cagataycivici.wordpress.com/2007/09/10/using-spring-to-manage-jsf-beans/" title="JSF+SPring" target="_blank">tutorial</a> i found. try running it using jetty 5 and the result is it didn&#8217;t work..<br />
i found java.lang.NoClassDefFoundError: javax/el/ELResolver error.<span id="more-12"></span><br />
Search in google, found out that jetty doesn&#8217;t work with jsf. So okay i  said, try use tomcat.. but again the result is the same error. Again googling search for answer.. then i found that we have to use <a href="https://glassfish.dev.java.net/" target="_blank">glassfish</a>. So i download, install and start up glassfish.<br />
We have to package our project to a war file to deploy, so i create a simple build.xml file to war the package.<br />
<code><br />
&lt;project name="JSFSimple" default="dist" basedir="."&gt;<br />
&lt;target name="dist" &gt;<br />
&lt;jar jarfile="jsfsimple.war" basedir="web"&gt;<br />
&lt;/jar&gt;<br />
&lt;/target&gt;<br />
&lt;/project&gt;<br />
</code><br />
After the war file deployed, i try to open the page i have created, index.jsp<br />
Again&#8230;error in the  page. org.apache.jasper.JasperException: java.lang.RuntimeException: Cannot find FacesContext<br />
&#8220;What is this?&#8221;, i say.. so hard just want to see a hello world message in your page..<br />
So, again i ask google. After a long and almost gave up process, i found a silly mistake. This is my web.xml code</p>
<p>&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;<br />
&lt;!DOCTYPE web-app<br />
PUBLIC &#8220;-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN&#8221;<br />
&#8220;<a href="http://java.sun.com/dtd/web-app_2_3.dtd&#8221;&gt;" rel="nofollow">http://java.sun.com/dtd/web-app_2_3.dtd&#8221;&gt;</a><br />
&lt;web-app&gt;</p>
<p>&lt;context-param&gt;<br />
&lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;<br />
&lt;param-value&gt;/WEB-INF/applicationContext.xml&lt;/param-value&gt;<br />
&lt;/context-param&gt;</p>
<p>&lt;listener&gt;<br />
&lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;<br />
&lt;/listener&gt;<br />
&lt;listener&gt;<br />
&lt;listener-class&gt;org.springframework.web.context.request.RequestContextListener&lt;/listener-class&gt;<br />
&lt;/listener&gt;</p>
<p>&lt;servlet&gt;<br />
&lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;<br />
&lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;<br />
&lt;load-on-startup&gt;1&lt;/load-on-startup&gt;<br />
&lt;/servlet&gt;<br />
&lt;servlet-mapping&gt;<br />
&lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;<br />
&lt;url-pattern&gt;<strong>*.jsf</strong>&lt;/url-pattern&gt;<br />
&lt;/servlet-mapping&gt;<br />
&lt;/web-app&gt;</p>
<p>I finally noticed that my url pattern is *.jsf, so i type <strong><a href="http://localhost:8080/jsfsimple/index.jsf" rel="nofollow">http://localhost:8080/jsfsimple/index.jsf</a></strong> and it finally show.. a nice hello world message.</p><br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gunnasatria.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gunnasatria.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gunnasatria.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gunnasatria.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gunnasatria.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gunnasatria.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gunnasatria.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gunnasatria.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gunnasatria.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gunnasatria.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gunnasatria.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gunnasatria.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gunnasatria.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gunnasatria.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gunnasatria.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gunnasatria.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=12&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gunnasatria.wordpress.com/2007/10/22/not-simple-jsfspring/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3e8463073f5d0f0a89691fefd7abd40e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gunnasatria</media:title>
		</media:content>
	</item>
		<item>
		<title>xampp</title>
		<link>http://gunnasatria.wordpress.com/2007/10/18/xampp/</link>
		<comments>http://gunnasatria.wordpress.com/2007/10/18/xampp/#comments</comments>
		<pubDate>Thu, 18 Oct 2007 07:45:32 +0000</pubDate>
		<dc:creator>gunnasatria</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://gunnasatria.wordpress.com/2007/10/18/xampp/</guid>
		<description><![CDATA[Are you familiar with PHPTriad in windows? Well you can get the same one for linux. Auto install apache,php,mysql and phpmyadmin. But becarefull, must configure phpmyadmin security first.. because it has a blank password in default installation. You can get xampp here.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=11&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Are you familiar with PHPTriad in windows? Well you can get the same one for linux. Auto install apache,php,mysql and phpmyadmin. But becarefull, must configure phpmyadmin security first.. because it has a blank password in default installation. You can get xampp <a href="http://www.apachefriends.org/en/xampp.html" target="_blank">here</a>.</p><br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gunnasatria.wordpress.com/11/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gunnasatria.wordpress.com/11/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gunnasatria.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gunnasatria.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gunnasatria.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gunnasatria.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gunnasatria.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gunnasatria.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gunnasatria.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gunnasatria.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gunnasatria.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gunnasatria.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gunnasatria.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gunnasatria.wordpress.com/11/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gunnasatria.wordpress.com/11/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gunnasatria.wordpress.com/11/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=11&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gunnasatria.wordpress.com/2007/10/18/xampp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3e8463073f5d0f0a89691fefd7abd40e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gunnasatria</media:title>
		</media:content>
	</item>
		<item>
		<title>Map Windows from Linux</title>
		<link>http://gunnasatria.wordpress.com/2007/10/18/map-windows-from-linux/</link>
		<comments>http://gunnasatria.wordpress.com/2007/10/18/map-windows-from-linux/#comments</comments>
		<pubDate>Thu, 18 Oct 2007 07:38:40 +0000</pubDate>
		<dc:creator>gunnasatria</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://gunnasatria.wordpress.com/2007/10/18/map-windows-from-linux/</guid>
		<description><![CDATA[We usually map linux share from windows using samba. Not the other way around. But i learn today that it can be done. We can use Sharity to do that.The configuration is very easy. All you have to do is extract the package on your linux. And run the application. For you who like GUI(like [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=10&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We usually map linux share from windows using samba. Not the other way around. But i learn today that it can be done. We can use <a href="http://www.obdev.at/products/sharity/index.html" target="_blank">Sharity </a> to do that.The configuration is very easy. All you have to do is extract the package on your linux. And run the application. For you who like GUI(like I do), there is one so don&#8217;t worry.<br />
After you run the application, enter your windows share, and your folder in linux file system as the mount destination.<br />
For the free version we can only mount one share at a time. It&#8217;s okay for me though <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p><br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/gunnasatria.wordpress.com/10/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/gunnasatria.wordpress.com/10/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gunnasatria.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/gunnasatria.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/gunnasatria.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/gunnasatria.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/gunnasatria.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/gunnasatria.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/gunnasatria.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/gunnasatria.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/gunnasatria.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/gunnasatria.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/gunnasatria.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/gunnasatria.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/gunnasatria.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/gunnasatria.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=gunnasatria.wordpress.com&amp;blog=1926171&amp;post=10&amp;subd=gunnasatria&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://gunnasatria.wordpress.com/2007/10/18/map-windows-from-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/3e8463073f5d0f0a89691fefd7abd40e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">gunnasatria</media:title>
		</media:content>
	</item>
	</channel>
</rss>
