<?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-32119691</id><updated>2012-02-16T11:18:03.668-08:00</updated><category term='linux'/><category term='hibernate'/><category term='thesis'/><category term='ant'/><category term='jsf'/><category term='java'/><category term='java compiler'/><category term='search engines'/><category term='ajax'/><category term='java servlets'/><category term='maven'/><category term='music'/><category term='jface'/><category term='NetBeans'/><category term='sobel filter'/><category term='rcp'/><category term='test'/><category term='j2me'/><category term='ivy'/><category term='artifactory'/><category term='jetty'/><category term='spring'/><category term='richfaces'/><category term='virus'/><category term='article'/><category term='eclipse'/><category term='sata'/><category term='artificial intelligence'/><title type='text'>where is my mind?</title><subtitle type='html'>Computer Science</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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>59</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-32119691.post-6408217514257758152</id><published>2010-09-07T11:22:00.001-07:00</published><updated>2010-09-07T11:22:48.604-07:00</updated><title type='text'>DSLs</title><content type='html'>Somewhere in the DSL world&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-6408217514257758152?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/6408217514257758152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=6408217514257758152' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6408217514257758152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6408217514257758152'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2010/09/dsls.html' title='DSLs'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-1183731469031147274</id><published>2010-02-25T03:59:00.000-08:00</published><updated>2010-02-25T04:02:19.504-08:00</updated><title type='text'>Domain Driven Design</title><content type='html'>Reading domain driven design... A book which increase your passion for software development.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-1183731469031147274?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/1183731469031147274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=1183731469031147274' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/1183731469031147274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/1183731469031147274'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2010/02/domain-driven-design.html' title='Domain Driven Design'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-1363339672169270957</id><published>2008-07-29T23:17:00.000-07:00</published><updated>2008-07-29T23:21:59.176-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sata'/><title type='text'>Installing Sata Driver After Installing XP</title><content type='html'>&lt;a href="http://www.theacerguy.com/2008/06/16/how-to-install-the-ahci-drivers-after-installing-xp-in-ide-mode/"&gt;This&lt;/a&gt; post worked excellent for me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-1363339672169270957?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/1363339672169270957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=1363339672169270957' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/1363339672169270957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/1363339672169270957'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/07/installing-sata-driver-after-installing.html' title='Installing Sata Driver After Installing XP'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-4038060958149771736</id><published>2008-07-28T06:56:00.000-07:00</published><updated>2008-07-28T07:14:55.152-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rcp'/><category scheme='http://www.blogger.com/atom/ns#' term='jface'/><title type='text'>MessageDialogWithToggle</title><content type='html'>If you want add some confirmation dialogs to your rcp project, you should look at MessageDialogWithToggle jface component. By using this component, you can save user's preferences for the next time your window open. So user can choose not to being prompted anymore. You can do a message dialog like Eclipse's Confirm Exit message dialog which contains a checkbox ( "Always Exit Without Prompt"). Or simply you can use this component to add a checkbox to MessageDialog component.&lt;br /&gt;&lt;a href="http://kickjava.com/src/org/eclipse/jface/dialogs/MessageDialogWithToggle.java.htm"&gt;&lt;br /&gt;MessageDialogWithToggle source&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-4038060958149771736?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/4038060958149771736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=4038060958149771736' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/4038060958149771736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/4038060958149771736'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/07/messagedialogwithtoggle.html' title='MessageDialogWithToggle'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-3558053459321752160</id><published>2008-07-27T23:13:00.000-07:00</published><updated>2008-07-27T23:19:00.093-07:00</updated><title type='text'>A tutorial for Spring,Hibernate,JSF,Richfaces</title><content type='html'>Post is moved to &lt;a href="http://sezera.blogspot.com/2008/07/sample-springhibernatejsfrichfaces.html"&gt;here&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-3558053459321752160?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/3558053459321752160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=3558053459321752160' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/3558053459321752160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/3558053459321752160'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/07/tutorial-for-springhibernatejsfrichface.html' title='A tutorial for Spring,Hibernate,JSF,Richfaces'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-229723489714698597</id><published>2008-07-22T00:04:00.001-07:00</published><updated>2008-07-22T00:04:37.549-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hibernate'/><category scheme='http://www.blogger.com/atom/ns#' term='jetty'/><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='richfaces'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><title type='text'>Sample Spring,Hibernate,JSF,Richfaces Application</title><content type='html'>&lt;span style="font-weight: bold;"&gt;MOTIVATION&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In this basic tutorial, I tried to show how spring, hibernate, jsf, richfaces can be used together as a working example. Sources can be downloaded at the end of page.&lt;br /&gt;&lt;br /&gt;I am working about 3 days to configure  Spring,Hibernate,JSF,Facelets,Richfaces all in one as a maven project with maven jetty plugin. Now it s time to share this configuration as a working example.&lt;br /&gt;&lt;div style="text-align: justify;"&gt; First lets look at root pom.xml&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ROOT pom.xml&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 800px; height: 300px; text-align: left;"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=&lt;br /&gt;"http://maven.apache.org/POM/4.0.0&lt;br /&gt;http://maven.apache.org/maven-v4_0_0.xsd"&amp;gt;&lt;br /&gt;&amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;blogspot.sezera.exampleproject&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;exampleproject&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;packaging&amp;gt;pom&amp;lt;/packaging&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;exampleproject&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;url&amp;gt;http://maven.apache.org&amp;lt;/url&amp;gt;&lt;br /&gt;&amp;lt;dependencies/&amp;gt;&lt;br /&gt;&amp;lt;modules&amp;gt;&lt;br /&gt;&amp;lt;module&amp;gt;exampleproject.core&amp;lt;/module&amp;gt;&lt;br /&gt;&amp;lt;module&amp;gt;exampleproject.web&amp;lt;/module&amp;gt;&lt;br /&gt;&amp;lt;/modules&amp;gt;&lt;br /&gt;&amp;lt;/project&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;We have  2 project. One of them is core and the other is web.&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;span&gt;Nothing is interesting here.&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;Core Project&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt; &lt;span style="font-weight: bold;"&gt;pom.xml&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;      &lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 800px; height: 600px; text-align: left;"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;project&amp;gt;&lt;br /&gt;&amp;lt;parent&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;exampleproject&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;blogspot.sezera.exampleproject&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/parent&amp;gt;&lt;br /&gt;&amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;blogspot.sezera.exampleproject.core&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;exampleproject.core&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;Exampleproject Core&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;url&amp;gt;http://maven.apache.org&amp;lt;/url&amp;gt;&lt;br /&gt;&amp;lt;build&amp;gt;&lt;br /&gt;&amp;lt;resources&amp;gt;&lt;br /&gt;&amp;lt;resource&amp;gt;&lt;br /&gt;&amp;lt;directory&amp;gt;target/generated-resources&amp;lt;/directory&amp;gt;&lt;br /&gt;&amp;lt;/resource&amp;gt;&lt;br /&gt;&amp;lt;resource&amp;gt;&lt;br /&gt;&amp;lt;directory&amp;gt;src/main/resources&amp;lt;/directory&amp;gt;&lt;br /&gt;&amp;lt;filtering&amp;gt;true&amp;lt;/filtering&amp;gt;&lt;br /&gt;&amp;lt;/resource&amp;gt;&lt;br /&gt;&amp;lt;/resources&amp;gt;&lt;br /&gt;&amp;lt;plugins&amp;gt;&lt;br /&gt;&amp;lt;plugin&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;maven-compiler-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;configuration&amp;gt;&lt;br /&gt;&amp;lt;source&amp;gt;1.5&amp;lt;/source&amp;gt;&lt;br /&gt;&amp;lt;target&amp;gt;1.5&amp;lt;/target&amp;gt;&lt;br /&gt;&amp;lt;/configuration&amp;gt;&lt;br /&gt;&amp;lt;/plugin&amp;gt;&lt;br /&gt;&amp;lt;/plugins&amp;gt;&lt;br /&gt;&amp;lt;/build&amp;gt;&lt;br /&gt;&amp;lt;dependencies&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;3.8.1&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;org.springframework&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;spring&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;2.5.4&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;org.hibernate&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;hibernate&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;3.2.6.ga&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;org.hibernate&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;hibernate-annotations&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;3.3.1.GA&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;org.hibernate&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;hibernate-tools&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;3.2.0.ga&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;mysql&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;mysql-connector-java&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;5.0.5&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;aspectj&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;aspectjweaver&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.5.4&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;/dependencies&amp;gt;&lt;br /&gt;&amp;lt;repositories&amp;gt;&lt;br /&gt;&amp;lt;repository&amp;gt;&lt;br /&gt;&amp;lt;id&amp;gt;maven2-repository.dev.java.net&amp;lt;/id&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;Java.net Repository for Maven&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;url&amp;gt;http://download.java.net/maven/2&amp;lt;/url&amp;gt;&lt;br /&gt;&amp;lt;layout&amp;gt;default&amp;lt;/layout&amp;gt;&lt;br /&gt;&amp;lt;/repository&amp;gt;&lt;br /&gt;&amp;lt;/repositories&amp;gt;&lt;br /&gt;&amp;lt;/project&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;java.net repository needed for maven to download Richfaces jars.  Other jars will be downloaded from  maven.org maven 2 repository.&lt;br /&gt;&lt;/div&gt;&lt;d&gt;&lt;d&gt;&lt;div style="text-align: left;"&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;dao-context.xml&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 800px; height: 600px; text-align: left;"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;!-- DATASOURCE DEFINITON--&amp;gt;&lt;br /&gt;&amp;lt;beans xmlns="http://www.springframework.org/schema/beans"&lt;br /&gt;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xsi:schemaLocation="http://www.springframework.org/schema/beans&lt;br /&gt;http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"&amp;gt;&lt;br /&gt;&amp;lt;bean id="dataSource"&lt;br /&gt;class="org.springframework.jdbc.datasource.DriverManagerDataSource"&amp;gt;&lt;br /&gt;&amp;lt;property name="driverClassName" value="com.mysql.jdbc.Driver" /&amp;gt;&lt;br /&gt;&amp;lt;property name="url" value="jdbc:mysql://localhost/exampleproject" /&amp;gt;&lt;br /&gt;&amp;lt;property name="username" value="root" /&amp;gt;&lt;br /&gt;&amp;lt;property name="password" value="" /&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;!-- HIBERNATE CONFIGURATION --&amp;gt;&lt;br /&gt;&amp;lt;bean id="sessionFactory"&lt;br /&gt;class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"&amp;gt;&lt;br /&gt;&amp;lt;property name="dataSource" ref="dataSource" /&amp;gt;&lt;br /&gt;&amp;lt;property name="annotatedClasses"&amp;gt;&lt;br /&gt;&amp;lt;list&amp;gt;&lt;br /&gt;&amp;lt;value&amp;gt;blogspot.sezera.exampleproject.domain.User&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;lt;/list&amp;gt;&lt;br /&gt;&amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;property name="hibernateProperties"&amp;gt;&lt;br /&gt;&amp;lt;props&amp;gt;&lt;br /&gt;&amp;lt;prop key="hibernate.dialect"&amp;gt;&lt;br /&gt;org.hibernate.dialect.MySQLDialect&lt;br /&gt;&amp;lt;/prop&amp;gt;&lt;br /&gt;&amp;lt;prop key="hibernate.show_sql"&amp;gt;true&amp;lt;/prop&amp;gt;&lt;br /&gt;&amp;lt;prop key="hibernate.use_outer_join"&amp;gt;true&amp;lt;/prop&amp;gt;&lt;br /&gt;&amp;lt;prop key="hibernate.max_fetch_depth"&amp;gt;1&amp;lt;/prop&amp;gt;&lt;br /&gt;&amp;lt;prop key="hibernate.jdbc.batch_size"&amp;gt;0&amp;lt;/prop&amp;gt;&lt;br /&gt;&amp;lt;prop key="hibernate.default_schema"&amp;gt;exampleproject&amp;lt;/prop&amp;gt;&lt;br /&gt;&amp;lt;prop key="hibernate.hbm2ddl.auto"&amp;gt;update&amp;lt;/prop&amp;gt;&lt;br /&gt;&amp;lt;/props&amp;gt;&lt;br /&gt;&amp;lt;/property&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&amp;lt;/beans&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;blogspot.sezera.exampleproject.domain.User class is entity class and it will be persisted to mysql  database with hibernate. Because User class using hibernate annotation , instead of xml mapping files, Spring's AnnotationSessionFactoryBean is used for building Session Factory bean. A datasource is defined and defined as a property to sessionFactory bean.&lt;br /&gt;User class is given as a parameter to annotatedClass list property. Here you must add your annotated classes which will be persisted to database.&lt;br /&gt;And another property is hibernateProperties which is actually arguments to hibernate. Here "default schema" is defined as "exampleproject" and hibernate.hbm2ddl.auto set to "update". It means hibernate will update database schema reading hibernate annotated entity classes like "User" class. There is no hbm.xml map files but its names stay same, actually everything done with annotation. So at first, you need to create an empty database schema (create database exampleproject)  in mysql database and hibernate will take care of rest.&lt;br /&gt;Actually we can move hibernateProperties property of sessionFactory bean to a file which is named "hibernate.properties"  but to keep space minimum it is written inside of dao-context.xml.&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;User.java&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 800px; height: 600px; text-align: left;"&gt;package blogspot.sezera.exampleproject.domain;&lt;br /&gt;&lt;br /&gt;import java.io.Serializable;&lt;br /&gt;&lt;br /&gt;import javax.persistence.Entity;&lt;br /&gt;import javax.persistence.GeneratedValue;&lt;br /&gt;import javax.persistence.Id;&lt;br /&gt;import javax.persistence.Table;&lt;br /&gt;&lt;br /&gt;@Entity&lt;br /&gt;@Table(name="User")&lt;br /&gt;public class User implements Serializable{&lt;br /&gt;&lt;br /&gt;private Long id;&lt;br /&gt;&lt;br /&gt;private String username;&lt;br /&gt;private String password;&lt;br /&gt;&lt;br /&gt;@Id&lt;br /&gt;@GeneratedValue&lt;br /&gt;public Long getId() {&lt;br /&gt;return id;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setId(Long id) {&lt;br /&gt;this.id = id;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public String getUsername() {&lt;br /&gt;return username;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setUsername(String username) {&lt;br /&gt;this.username = username;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public String getPassword() {&lt;br /&gt;return password;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setPassword(String password) {&lt;br /&gt;this.password = password;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;User class is a basic entity with email, password fields and accessor methods. id attribute is defined as unique identifier for User entity by @Id annotation. Accessor  for id is getId() method. Here ids are generating and managing by hibernate.  @GeneratedValue annotation can be used for defining id generation strategy but we leave it default here.&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;main-context.xml&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 800px; height: 600px; text-align: left;"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;beans xmlns="http://www.springframework.org/schema/beans"&lt;br /&gt;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xmlns:aop="http://www.springframework.org/schema/aop"&lt;br /&gt;xmlns:tx="http://www.springframework.org/schema/tx"&lt;br /&gt;xsi:schemaLocation="http://www.springframework.org/schema/beans&lt;br /&gt;http://www.springframework.org/schema/beans/spring-beans-2.0.xsd&lt;br /&gt;http://www.springframework.org/schema/tx&lt;br /&gt;http://www.springframework.org/schema/tx/spring-tx-2.5.xsd&lt;br /&gt;http://www.springframework.org/schema/aop&lt;br /&gt;http://www.springframework.org/schema/aop/spring-aop-2.5.xsd"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;import resource="dao-Context.xml"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!--SERVICE BEAN DEFINITIONS--&amp;gt;&lt;br /&gt;&amp;lt;bean id="userService"&lt;br /&gt;class="blogspot.sezera.exampleproject.service.impl.UserServiceImpl"&amp;gt;&lt;br /&gt;&amp;lt;constructor-arg ref="sessionFactory"&amp;gt;&amp;lt;/constructor-arg&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!--TRANSACTIAN MANAGEMENT--&amp;gt;&lt;br /&gt;&amp;lt;bean id="txManager"&lt;br /&gt;class="org.springframework.orm.hibernate3.HibernateTransactionManager"&amp;gt;&lt;br /&gt;&amp;lt;property name="sessionFactory" ref="sessionFactory" /&amp;gt;&lt;br /&gt;&amp;lt;/bean&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;tx:advice id="txAdvice" transaction-manager="txManager"&amp;gt;&lt;br /&gt;&amp;lt;!-- the transactional semantics... --&amp;gt;&lt;br /&gt;&amp;lt;tx:attributes&amp;gt;&lt;br /&gt;&amp;lt;!-- all methods starting with 'get' are read-only --&amp;gt;&lt;br /&gt;&amp;lt;tx:method name="get*" read-only="true" /&amp;gt;&lt;br /&gt;&amp;lt;!-- other methods use the default transaction settings (see below) --&amp;gt;&lt;br /&gt;&amp;lt;tx:method name="*" /&amp;gt;&lt;br /&gt;&amp;lt;/tx:attributes&amp;gt;&lt;br /&gt;&amp;lt;/tx:advice&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!-- ensure that the above transactional advice runs for any execution&lt;br /&gt;of an operation defined by the userManagementService interface --&amp;gt;&lt;br /&gt;&amp;lt;aop:config&amp;gt;&lt;br /&gt;&amp;lt;aop:pointcut id="managementServiceOperation"&lt;br /&gt;expression="execution(* blogspot.sezera.exampleproject.service.*.*(..))" /&amp;gt;&lt;br /&gt;&amp;lt;aop:advisor advice-ref="txAdvice"&lt;br /&gt;pointcut-ref="managementServiceOperation" /&amp;gt;&lt;br /&gt;&amp;lt;/aop:config&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/beans&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;main-Context.xml corresponds to Spring's applications classic application-context.xml but we moved entity definition, database and hibernate configurations to dao-Context.xml so we start with importing it.&lt;br /&gt;Every class in service layer has its own interface so UserService interface defined with single createUser method. userService bean is defined with concrete UserServiceImpl class and sessionFactory  which is defined in dao-Context.xml before is injected with constructor injection.&lt;br /&gt;Hibernate needs transactions.Without transactions you can't write anything to database.Thanks to aspects  transaction behaviour of exampleproject defined easily.A transaction manager bean is defined and sessionFactory instance is given via setter injection.Secondly an advice is defined which says all methods starts with get(like getUserName ...)  in a transaction is readonly and other metods are in default transaction behaviour. Critical point is defining where to apply advice in short pointcuts. With aspect expression we define pointcuts for every class under blogspot.sezera.exampleproject.core.service package which is actually service layer.&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;UserService.java&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 800px; height: 100px; text-align: left;"&gt;package blogspot.sezera.exampleproject.service;&lt;br /&gt;public interface UserService {&lt;br /&gt;&lt;br /&gt;void createUser(String username,String password);&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;UserServiceImpl.java&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 800px; height: 400px; text-align: left;"&gt;package blogspot.sezera.exampleproject.service.impl;&lt;br /&gt;&lt;br /&gt;import org.hibernate.SessionFactory;&lt;br /&gt;&lt;br /&gt;import blogspot.sezera.exampleproject.dao.GenericDaoImpl;&lt;br /&gt;import blogspot.sezera.exampleproject.domain.User;&lt;br /&gt;import blogspot.sezera.exampleproject.service.UserService;&lt;br /&gt;&lt;br /&gt;public class UserServiceImpl implements UserService{&lt;br /&gt;&lt;br /&gt;private SessionFactory m_sessionFactory;&lt;br /&gt;private GenericDaoImpl&amp;lt;User,Long&amp;gt; userDao;&lt;br /&gt;&lt;br /&gt;public UserServiceImpl(SessionFactory sessionFactory) {&lt;br /&gt;m_sessionFactory = sessionFactory;&lt;br /&gt;userDao = new GenericDaoImpl&amp;lt;User, Long&amp;gt;(m_sessionFactory){};&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void createUser(String username, String password) {&lt;br /&gt;User user = null;&lt;br /&gt;if(username!=null){&lt;br /&gt;user = new User();&lt;br /&gt;user.setUsername(username);&lt;br /&gt;user.setPassword(password);&lt;br /&gt;  userDao.makePersistent(user);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Here Dao pattern is used with generics support. A GenericDaoImpl instance is created for User entity and persisted with makePersistent method which is actually a single line: getSession().saveOrUpdate(entity).&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;GenericDao.java&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 800px; height: 100px; text-align: left;"&gt;package blogspot.sezera.exampleproject.dao;&lt;br /&gt;package blogspot.sezera.exampleproject.dao;&lt;br /&gt;&lt;br /&gt;import java.io.Serializable;&lt;br /&gt;&lt;br /&gt;public interface GenericDao&amp;lt;T extends Serializable,ID extends Serializable&amp;gt;{&lt;br /&gt;T makePersistent(T entity);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;GenericDaoImpl.java&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 800px; height: 200px; text-align: left;"&gt;package blogspot.sezera.exampleproject.dao;&lt;br /&gt;&lt;br /&gt;import java.io.Serializable;&lt;br /&gt;import org.hibernate.Session;&lt;br /&gt;import org.hibernate.SessionFactory;&lt;br /&gt;&lt;br /&gt;public abstract class GenericDaoImpl&amp;lt;T extends Serializable,ID extends Serializable&amp;gt; implements&lt;br /&gt;GenericDao&amp;lt;T,ID&amp;gt;{&lt;br /&gt;&lt;br /&gt;private SessionFactory sessionFactory;&lt;br /&gt;&lt;br /&gt;public GenericDaoImpl(SessionFactory sessionFactory) {&lt;br /&gt;this.sessionFactory = sessionFactory;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public T makePersistent(T entity) {&lt;br /&gt;getSession().saveOrUpdate(entity);&lt;br /&gt;return entity;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;protected Session getSession() {&lt;br /&gt;return sessionFactory.getCurrentSession();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;Now we have everything in core side to create a User. So  moving to web project.&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Web project&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;pom.xml&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;/d&gt;&lt;/d&gt;&lt;br /&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 800px; height: 600px; text-align: left;"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;project&amp;gt;&lt;br /&gt;&amp;lt;parent&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;exampleproject&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;blogspot.sezera.exampleproject&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/parent&amp;gt;&lt;br /&gt;&amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;blogspot.sezera.exampleproject.web&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;exampleproject.web&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;packaging&amp;gt;war&amp;lt;/packaging&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;exampleproject.web Maven Webapp&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;url&amp;gt;http://maven.apache.org&amp;lt;/url&amp;gt;&lt;br /&gt;&amp;lt;build&amp;gt;&lt;br /&gt;&amp;lt;finalName&amp;gt;exampleproject.web&amp;lt;/finalName&amp;gt;&lt;br /&gt;&amp;lt;!--MAVEN JETTY PLUGIN--&amp;gt;&lt;br /&gt;&amp;lt;plugins&amp;gt;&lt;br /&gt;&amp;lt;plugin&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;org.mortbay.jetty&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;maven-jetty-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;6.1.10&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;configuration&amp;gt;&lt;br /&gt;&amp;lt;scanIntervalSeconds&amp;gt;3&amp;lt;/scanIntervalSeconds&amp;gt;&lt;br /&gt;&amp;lt;/configuration&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/plugin&amp;gt;&lt;br /&gt;&amp;lt;/plugins&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/build&amp;gt;&lt;br /&gt;&amp;lt;dependencies&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;blogspot.sezera.exampleproject.core&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;exampleproject.core&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;junit&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;junit&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;3.8.1&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;javax.faces&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;jsf-api&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.2_02&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;com.sun.facelets&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;jsf-facelets&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.1.11&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;javax.faces&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;jsf-impl&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.2-b19&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;taglibs&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;standard&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.1.2&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;jstl&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;jstl&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;1.1.2&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;&amp;lt;groupId&amp;gt;org.richfaces.ui&amp;lt;/groupId&amp;gt;&lt;br /&gt;&amp;lt;artifactId&amp;gt;richfaces-ui&amp;lt;/artifactId&amp;gt;&lt;br /&gt;&amp;lt;version&amp;gt;3.1.0&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/dependencies&amp;gt;&lt;br /&gt;&amp;lt;repositories&amp;gt;&lt;br /&gt;&amp;lt;repository&amp;gt;&lt;br /&gt;&amp;lt;id&amp;gt;repository.jboss.com&amp;lt;/id&amp;gt;&lt;br /&gt;&amp;lt;name&amp;gt;Jboss Repository for Maven&amp;lt;/name&amp;gt;&lt;br /&gt;&amp;lt;url&amp;gt;http://repository.jboss.com/maven2/&amp;lt;/url&amp;gt;&lt;br /&gt;&amp;lt;layout&amp;gt;default&amp;lt;/layout&amp;gt;&lt;br /&gt;&amp;lt;/repository&amp;gt;&lt;br /&gt;&amp;lt;/repositories&amp;gt;&lt;br /&gt;&amp;lt;/project&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;UserController.java&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 800px; height: 600px; text-align: left;"&gt;package blogspot.sezera.exampleproject.controller;&lt;br /&gt;&lt;br /&gt;import blogspot.sezera.exampleproject.service.UserService;&lt;br /&gt;&lt;br /&gt;public class UserController {&lt;br /&gt;&lt;br /&gt;private UserService service;&lt;br /&gt;private String username;&lt;br /&gt;private String password;&lt;br /&gt;&lt;br /&gt;public UserController(){&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;public String getUsername() {&lt;br /&gt;return username;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setUsername(String username) {&lt;br /&gt;this.username = username;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public String getPassword() {&lt;br /&gt;return password;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setPassword(String password) {&lt;br /&gt;this.password = password;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setService(UserService service) {&lt;br /&gt;this.service = service;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void createUser(){&lt;br /&gt;service.createUser(username, password);&lt;br /&gt;}&lt;br /&gt;public UserService getService() {&lt;br /&gt;return service;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;EmailValidator.java&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 800px; height: 300px; text-align: left;"&gt;package blogspot.sezera.exampleproject.validator;&lt;br /&gt;&lt;br /&gt;import java.util.ResourceBundle;&lt;br /&gt;&lt;br /&gt;import javax.faces.application.FacesMessage;&lt;br /&gt;import javax.faces.component.UIComponent;&lt;br /&gt;import javax.faces.context.FacesContext;&lt;br /&gt;import javax.faces.validator.Validator;&lt;br /&gt;import javax.faces.validator.ValidatorException;&lt;br /&gt;&lt;br /&gt;public class EmailValidator implements Validator{&lt;br /&gt;&lt;br /&gt;public void validate(FacesContext arg0, UIComponent arg1, Object arg2)&lt;br /&gt;throws ValidatorException {&lt;br /&gt;&lt;br /&gt;String email = arg2.toString();&lt;br /&gt;if(email.contains("@")==false){&lt;br /&gt;//error message&lt;br /&gt;ResourceBundle bundle = ResourceBundle.getBundle("messages",arg0.getCurrentInstance().getViewRoot().getLocale());&lt;br /&gt;FacesMessage msg = new FacesMessage(bundle.getString("emailNotValid"));&lt;br /&gt;throw new ValidatorException(msg);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;To validate user email address when creating user I have created a basic EmailValidator. It validates if user email address contains "@". If not a ValidatorException is thrown.&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;messages_en_US.properties&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 800px; height: 50px; text-align: left;"&gt;&lt;br /&gt;emailNotValid=E-mail is not valid&lt;br /&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;newUser.xhtml&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 800px; height: 600px; text-align: left;"&gt;&amp;lt;?xml version='1.0' encoding='UTF-8' ?&amp;gt;&lt;br /&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"&lt;br /&gt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&amp;gt;&lt;br /&gt;&amp;lt;html xmlns="http://www.w3.org/1999/xhtml"&lt;br /&gt;xmlns:ui="http://java.sun.com/jsf/facelets"&lt;br /&gt;xmlns:f="http://java.sun.com/jsf/core"&lt;br /&gt;xmlns:h="http://java.sun.com/jsf/html"&lt;br /&gt;xmlns:a4j="http://richfaces.org/a4j"&lt;br /&gt;xmlns:rich="http://richfaces.org/rich"&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;New User&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;f:view&amp;gt;&lt;br /&gt;&amp;lt;h:form&amp;gt;&lt;br /&gt;&amp;lt;table&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;h:outputLabel value="UserName "&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;h:inputText id="email" value="#{userController.username}"&amp;gt;&lt;br /&gt;&amp;lt;f:validator validatorId="emailValidator" /&amp;gt;&lt;br /&gt;&amp;lt;a4j:support event="onkeyup" requestDelay="300" reRender="output"/&amp;gt;&lt;br /&gt;&amp;lt;/h:inputText&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&lt;br /&gt;&amp;lt;h:outputLabel id="output"&amp;gt;&lt;br /&gt;&amp;lt;h:message for="email"/&amp;gt;&lt;br /&gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;tr&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;h:outputLabel value="Password"&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;td&amp;gt;&amp;lt;h:inputSecret value="#{userController.password}"&amp;gt;&amp;lt;/h:inputSecret&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;&amp;lt;/table&amp;gt;&lt;br /&gt;&amp;lt;h:commandButton value="Create User" action="#{userController.createUser}"&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;&amp;lt;/h:form&amp;gt;&lt;br /&gt;&amp;lt;/f:view&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;When user started to write his email address, page send an AJAX request to server in every 300 second and EmailValidator executes. If there is an error in user email, page renders an error message right of user email input text area.&lt;br /&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;web.xml&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 800px; height: 600px; text-align: left;"&gt;&amp;lt;?xml version="1.0"?&amp;gt;&lt;br /&gt;&amp;lt;web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"&lt;br /&gt;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&amp;gt;&lt;br /&gt;&amp;lt;display-name&amp;gt;ExampleProject Web&amp;lt;/display-name&amp;gt;&lt;br /&gt;&amp;lt;context-param&amp;gt;&lt;br /&gt;&amp;lt;param-name&amp;gt;contextConfigLocation&amp;lt;/param-name&amp;gt;&lt;br /&gt;&amp;lt;param-value&amp;gt;classpath*:/main-Context.xml&amp;lt;/param-value&amp;gt;&lt;br /&gt;&amp;lt;/context-param&amp;gt;&lt;br /&gt;&amp;lt;context-param&amp;gt;&lt;br /&gt;&amp;lt;param-name&amp;gt;javax.faces.DEFAULT_SUFFIX&amp;lt;/param-name&amp;gt;&lt;br /&gt;&amp;lt;param-value&amp;gt;.xhtml&amp;lt;/param-value&amp;gt;&lt;br /&gt;&amp;lt;/context-param&amp;gt;&lt;br /&gt;&amp;lt;context-param&amp;gt;&lt;br /&gt;&amp;lt;param-name&amp;gt;org.richfaces.SKIN&amp;lt;/param-name&amp;gt;&lt;br /&gt;&amp;lt;param-value&amp;gt;classic&amp;lt;/param-value&amp;gt;&lt;br /&gt;&amp;lt;/context-param&amp;gt;&lt;br /&gt;&amp;lt;context-param&amp;gt;&lt;br /&gt;&amp;lt;param-name&amp;gt;org.ajax4jsf.VIEW_HANDLERS&amp;lt;/param-name&amp;gt;&lt;br /&gt;&amp;lt;param-value&amp;gt;com.sun.facelets.FaceletViewHandler&amp;lt;/param-value&amp;gt;&lt;br /&gt;&amp;lt;/context-param&amp;gt;&lt;br /&gt;&amp;lt;filter&amp;gt;&lt;br /&gt;&amp;lt;display-name&amp;gt;RichFaces Filter&amp;lt;/display-name&amp;gt;&lt;br /&gt;&amp;lt;filter-name&amp;gt;richfaces&amp;lt;/filter-name&amp;gt;&lt;br /&gt;&amp;lt;filter-class&amp;gt;org.ajax4jsf.Filter&amp;lt;/filter-class&amp;gt;&lt;br /&gt;&amp;lt;/filter&amp;gt;&lt;br /&gt;&amp;lt;filter-mapping&amp;gt;&lt;br /&gt;&amp;lt;filter-name&amp;gt;richfaces&amp;lt;/filter-name&amp;gt;&lt;br /&gt;&amp;lt;servlet-name&amp;gt;Faces Servlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;&amp;lt;dispatcher&amp;gt;REQUEST&amp;lt;/dispatcher&amp;gt;&lt;br /&gt;&amp;lt;dispatcher&amp;gt;FORWARD&amp;lt;/dispatcher&amp;gt;&lt;br /&gt;&amp;lt;dispatcher&amp;gt;INCLUDE&amp;lt;/dispatcher&amp;gt;&lt;br /&gt;&amp;lt;/filter-mapping&amp;gt;&lt;br /&gt;&amp;lt;listener&amp;gt;&lt;br /&gt;&amp;lt;listener-class&amp;gt;&lt;br /&gt;org.springframework.web.context.ContextLoaderListener&lt;br /&gt;&amp;lt;/listener-class&amp;gt;&lt;br /&gt;&amp;lt;/listener&amp;gt;&lt;br /&gt;&amp;lt;listener&amp;gt;&lt;br /&gt;&amp;lt;listener-class&amp;gt;&lt;br /&gt;org.springframework.web.util.IntrospectorCleanupListener&lt;br /&gt;&amp;lt;/listener-class&amp;gt;&lt;br /&gt;&amp;lt;/listener&amp;gt;&lt;br /&gt;&amp;lt;listener&amp;gt;&lt;br /&gt;&amp;lt;listener-class&amp;gt;&lt;br /&gt;org.springframework.web.context.request.RequestContextListener&lt;br /&gt;&amp;lt;/listener-class&amp;gt;&lt;br /&gt;&amp;lt;/listener&amp;gt;&lt;br /&gt;&amp;lt;servlet&amp;gt;&lt;br /&gt;&amp;lt;servlet-name&amp;gt;Faces Servlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;&amp;lt;servlet-class&amp;gt;javax.faces.webapp.FacesServlet&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;&amp;lt;load-on-startup&amp;gt;1&amp;lt;/load-on-startup&amp;gt;&lt;br /&gt;&amp;lt;/servlet&amp;gt;&lt;br /&gt;&amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;&amp;lt;servlet-name&amp;gt;Faces Servlet&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;&amp;lt;url-pattern&amp;gt;*.faces&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;&amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;&amp;lt;login-config&amp;gt;&lt;br /&gt;&amp;lt;auth-method&amp;gt;BASIC&amp;lt;/auth-method&amp;gt;&lt;br /&gt;&amp;lt;/login-config&amp;gt;&lt;br /&gt;&amp;lt;/web-app&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;faces-config.xml&lt;/span&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre class="alt2" dir="ltr" style="border: 1px inset ; margin: 0px; padding: 0px; overflow: auto; width: 800px; height: 600px; text-align: left;"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;faces-config xmlns="http://java.sun.com/xml/ns/javaee"&lt;br /&gt;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"&lt;br /&gt;version="1.2"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;application&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;resource-bundle&amp;gt;&lt;br /&gt;&amp;lt;base-name&amp;gt;messages&amp;lt;/base-name&amp;gt;&lt;br /&gt;&amp;lt;var&amp;gt;msgs&amp;lt;/var&amp;gt;&lt;br /&gt;&amp;lt;/resource-bundle&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;locale-config&amp;gt;&lt;br /&gt;&amp;lt;default-locale&amp;gt;en_US&amp;lt;/default-locale&amp;gt;&lt;br /&gt;&amp;lt;/locale-config&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;variable-resolver&amp;gt;&lt;br /&gt;org.springframework.web.jsf.DelegatingVariableResolver&lt;br /&gt;&amp;lt;/variable-resolver&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/application&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;validator&amp;gt;&lt;br /&gt;&amp;lt;validator-id&amp;gt;emailValidator&amp;lt;/validator-id&amp;gt;&lt;br /&gt;&amp;lt;validator-class&amp;gt;&lt;br /&gt;blogspot.sezera.exampleproject.validator.EmailValidator&lt;br /&gt;&amp;lt;/validator-class&amp;gt;&lt;br /&gt;&amp;lt;/validator&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;managed-bean&amp;gt;&lt;br /&gt;&amp;lt;managed-bean-name&amp;gt;userController&amp;lt;/managed-bean-name&amp;gt;&lt;br /&gt;&amp;lt;managed-bean-class&amp;gt;&lt;br /&gt;blogspot.sezera.exampleproject.controller.UserController&lt;br /&gt;&amp;lt;/managed-bean-class&amp;gt;&lt;br /&gt;&amp;lt;managed-bean-scope&amp;gt;session&amp;lt;/managed-bean-scope&amp;gt;&lt;br /&gt;&amp;lt;managed-property&amp;gt;&lt;br /&gt;&amp;lt;property-name&amp;gt;service&amp;lt;/property-name&amp;gt;&lt;br /&gt;&amp;lt;value&amp;gt;#{userService}&amp;lt;/value&amp;gt;&lt;br /&gt;&amp;lt;/managed-property&amp;gt;&lt;br /&gt;&amp;lt;/managed-bean&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/faces-config&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;HOW TO RUN EXAMPLEPROJECT&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;download source codes without jars.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;mvn clean install under root directory&lt;/li&gt;&lt;li&gt;create an empty database named "exampleproject" in mysql&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Under exampleproject.web execute: mvn jetty:run&lt;/li&gt;&lt;li&gt;http://localhost:8080/exampleproject.web/newUser.faces&lt;/li&gt;&lt;/ul&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;NOTE:Attention to url extension is .faces NOT .xhtml. It must be same as url-pattern of Faces Servlet Mapping in web.xml.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;SCREENSHOT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_boBGNT85DDE/SHdPDfgSdcI/AAAAAAAAADg/VppZif0yH1M/s1600-h/exampleproject.JPG"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_boBGNT85DDE/SHdPDfgSdcI/AAAAAAAAADg/VppZif0yH1M/s400/exampleproject.JPG" alt="" id="BLOGGER_PHOTO_ID_5221729214374507970" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;DOWNLOAD&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;S&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;a href="http://rapidshare.com/files/129333598/exampleproject.rar"&gt;source codes&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://rapidshare.com/files/129819042/A_tutorial_for_Spring_Hibernate_JSF_Richfaces.pdf"&gt;pdf version&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;REFERENCES&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://static.springframework.org/spring/docs/2.5.x/reference/web-integration.html#jsf-delegatingvariableresolver"&gt;Spring - JSF integration&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#d0e2123"&gt;Hibernate Reference&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.jboss.org/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html/support.html"&gt;a4j:support&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;AUTHOR&lt;br /&gt;&lt;br /&gt;Sezer Akar&lt;br /&gt;&lt;a href="http://sezera.blogspot.com/"&gt;Blog&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-229723489714698597?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/229723489714698597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=229723489714698597' title='32 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/229723489714698597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/229723489714698597'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/07/sample-springhibernatejsfrichfaces.html' title='Sample Spring,Hibernate,JSF,Richfaces Application'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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/_boBGNT85DDE/SHdPDfgSdcI/AAAAAAAAADg/VppZif0yH1M/s72-c/exampleproject.JPG' height='72' width='72'/><thr:total>32</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32119691.post-7647013572021444195</id><published>2008-06-05T05:11:00.000-07:00</published><updated>2008-06-05T05:27:47.232-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='eclipse'/><title type='text'>Shared Configuration In Eclipse</title><content type='html'>I realized that even if you don't do anything for shared configuration scenario as described eclipse doc,Eclipse can manage multi users by default. You need to be sure that your default configuration folder( which has config.ini inside of it)of your RCP application is read-only to every user except that &lt;span style="font-weight: bold;"&gt;root&lt;/span&gt;. You have 1 installation for your RCP app and every user can execute the same app. By default, when your RCP app can't write to configuration folder, it creates 2 folder inside of user (who executed app) home directory. 1 for workspace settings and the other for .eclipse folder.&lt;br /&gt;.eclipse/your RCP product/configuration/config.ini  is created automatically too. If you look inside of it :&lt;br /&gt;osgi.sharedConfiguration.area=file\:configuration/&lt;br /&gt;It basicly has a link to shared configuration area which is by default configuration folder in RCP product installation. So only root can install plug-in s and every user executed RCP app can see new plugs but cant uninstall or disable and install new plugs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-7647013572021444195?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/7647013572021444195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=7647013572021444195' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/7647013572021444195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/7647013572021444195'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/06/shared-configuration-in-eclipse.html' title='Shared Configuration In Eclipse'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-5616575408740731746</id><published>2008-05-15T23:09:00.000-07:00</published><updated>2008-05-15T23:21:36.769-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='music'/><title type='text'>java song</title><content type='html'>java java java java jing jing jing!&lt;br /&gt;An excellent java song for java addicts. You can &lt;a href="http://rapidshare.com/files/115249171/Java.mp3"&gt;download &lt;/a&gt;and enjoy it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-5616575408740731746?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/5616575408740731746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=5616575408740731746' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/5616575408740731746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/5616575408740731746'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/05/java-song.html' title='java song'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-5818053937365259594</id><published>2008-03-08T13:22:00.000-08:00</published><updated>2008-03-08T15:10:44.541-08:00</updated><title type='text'>jsp and one last goodbye</title><content type='html'>damn you jsp.I have studied almost 2 month about jsp/servlet technology to pass the scwcd exam.&lt;br /&gt;Although i am not interested in web component development, i thought that i have to learn jsp technology.But things doesnt work like that.We dont need to follow technology we need to follow what is behind technology.(saint john locke smile here).now my favorites are java server faces and facelets.damn you jsp.Who likes java inside html nowadays?No thanks.I lost my appetence.Maybe after after years now somebody thinks in the same way we think for jsp/servlet for server faces and facelets.(yes this is the rule of development the big truth ladder always go forward) or maybe not. Maybe development is not a simple ladder. We are out of our imagination and we only hope to develop always.And the truht beside us something really different.Year 2099.There is no java! damn you jsp i told you not to be so bad.I hope we can leave something for future a bit of thing.There will no books to write us but internet can save us for hundreds of years too.But who knows maybe we dont need internet in 2099?Damn i am so desperate.See you in another life brother.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-5818053937365259594?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/5818053937365259594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=5818053937365259594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/5818053937365259594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/5818053937365259594'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/03/jsp-and-one-last-goodbye.html' title='jsp and one last goodbye'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-5831096929924094927</id><published>2008-02-15T09:48:00.000-08:00</published><updated>2008-07-14T03:03:18.504-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ajax'/><category scheme='http://www.blogger.com/atom/ns#' term='richfaces'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><title type='text'>First Sample Richfaces Ajax Web Application</title><content type='html'>&lt;a href="http://rapidshare.com/files/129587459/DemoAjax.rar"&gt;Download&lt;/a&gt; echo example with neccessary jars introduced in &lt;a href="http://labs.jboss.com/file-access/default/members/jbossrichfaces/freezone/docs/devguide/en/html_single/index.html"&gt;Richfaces Developer Guide&lt;/a&gt;&lt;br /&gt;Successfully tested in Apache Tomcat 6.0.&lt;br /&gt;Call it&lt;br /&gt;http://localhost:8080/DemoAjax/echo.do&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-5831096929924094927?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/5831096929924094927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=5831096929924094927' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/5831096929924094927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/5831096929924094927'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/02/first-sample-richfaces-ajax-web.html' title='First Sample Richfaces Ajax Web Application'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32119691.post-9199969033726235627</id><published>2008-02-04T04:46:00.000-08:00</published><updated>2008-02-04T04:52:45.691-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='search engines'/><title type='text'>Search For Meaning</title><content type='html'>&lt;a href="http://www.hakia.com/"&gt;Hakia&lt;/a&gt; is new search engine for meaningful searches. It is beta right now but i think it will develop and be popular quickly because it can answer intelligent questions like : what is the meaning of life:)) Or sth more beneficial : Has anyone seen Dane Cook commercials?. like its main page says.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-9199969033726235627?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/9199969033726235627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=9199969033726235627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/9199969033726235627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/9199969033726235627'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/02/search-for-meaning.html' title='Search For Meaning'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-838154334360513125</id><published>2008-02-01T07:18:00.000-08:00</published><updated>2008-02-01T07:38:18.744-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='virus'/><title type='text'>F:\RECYCLER\RECYLER</title><content type='html'>Yesterday i noticed my usb doesn't open correctly with double-click.&lt;br /&gt;Kaspersky anti-virus doesnt find anything when i scanned it.In its logs it says it checked sth like F:\RECYCLER\RECYCLER and some files under it.But when i open my usb with explorer i couldnt see them.So i went to command shell in windows and typed&lt;br /&gt;&lt;br /&gt;&gt;ls -al&lt;br /&gt;&gt;rm -f -r RECYCLER&lt;br /&gt;&lt;br /&gt;and what is it now gone.&lt;br /&gt;&lt;br /&gt;I can open my usb with double-click now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-838154334360513125?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/838154334360513125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=838154334360513125' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/838154334360513125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/838154334360513125'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/02/frecyclerrecyler.html' title='F:\RECYCLER\RECYLER'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-8664573139035152620</id><published>2008-01-30T05:53:00.001-08:00</published><updated>2008-01-30T06:45:55.122-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ivy'/><category scheme='http://www.blogger.com/atom/ns#' term='artifactory'/><title type='text'>Example ivy settings.xml for artifactory repository</title><content type='html'>Below you can find settings.xml for your project.It defines dependencies for ivy.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_boBGNT85DDE/R6CBihnRpgI/AAAAAAAAACU/3gTmnO3Z-q0/s1600-h/settings.bmp"&gt;&lt;img style="cursor: pointer;" src="http://2.bp.blogspot.com/_boBGNT85DDE/R6CBihnRpgI/AAAAAAAAACU/3gTmnO3Z-q0/s400/settings.bmp" alt="" id="BLOGGER_PHOTO_ID_5161267603105228290" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;And artifactory directory structure is like that:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_boBGNT85DDE/R6CF5xnRpiI/AAAAAAAAACk/8eYYDnD6-Do/s1600-h/artifactorydirstructure.bmp"&gt;&lt;img style="cursor: pointer;" src="http://3.bp.blogspot.com/_boBGNT85DDE/R6CF5xnRpiI/AAAAAAAAACk/8eYYDnD6-Do/s400/artifactorydirstructure.bmp" alt="" id="BLOGGER_PHOTO_ID_5161272400583697954" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Point that dependency is written like&lt;br /&gt;javax/faces&lt;br /&gt;NOT&lt;br /&gt;javax.faces&lt;br /&gt;&lt;br /&gt;in settings.xml&lt;br /&gt;&lt;br /&gt;                    http://myserverip:port/artifactory/repo/javax/faces/jsf-api/1.1_02/jsf-api-1.1_02.jar&lt;br /&gt;&lt;br /&gt;in ivysettings.xml&lt;br /&gt;&lt;br /&gt;[organisation]     =  javax/faces&lt;br /&gt;[module]             =   jsf-api&lt;br /&gt;[revision]            =  1.1_02&lt;br /&gt;[artifact]-[revision].[ext] = jsf-api-1.1_02.jar&lt;br /&gt;&lt;br /&gt;in settings.xml&lt;br /&gt;&lt;br /&gt;[org]                   =   javax/faces&lt;br /&gt;[name]               =   jsf-api&lt;br /&gt;[rev]                   =  1.1_02&lt;br /&gt;&lt;br /&gt;Previously i wrote that artifactory can't download artifacts when I build project with ant-ivy.I realized that I should write dependencies like &lt;span style="font-weight: bold;"&gt;javax/faces&lt;/span&gt; NOT &lt;span style="font-weight: bold;"&gt;javax.faces&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-8664573139035152620?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/8664573139035152620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=8664573139035152620' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/8664573139035152620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/8664573139035152620'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/01/example-ivy-settingsxml-for-artifactory.html' title='Example ivy settings.xml for artifactory repository'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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/_boBGNT85DDE/R6CBihnRpgI/AAAAAAAAACU/3gTmnO3Z-q0/s72-c/settings.bmp' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32119691.post-2694732565006467150</id><published>2008-01-30T04:31:00.000-08:00</published><updated>2008-01-30T06:36:29.555-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ivy'/><category scheme='http://www.blogger.com/atom/ns#' term='artifactory'/><title type='text'>Example ivy ivysettings.xml for artifactory repository</title><content type='html'>You can find below how you need to define your ivysettings.xml for your artifactory repository.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_boBGNT85DDE/R6B7ZRnRpfI/AAAAAAAAACM/1JUi_kE_mOQ/s1600-h/ivysettings.bmp"&gt;&lt;img style="cursor: pointer;" src="http://1.bp.blogspot.com/_boBGNT85DDE/R6B7ZRnRpfI/AAAAAAAAACM/1JUi_kE_mOQ/s400/ivysettings.bmp" alt="" id="BLOGGER_PHOTO_ID_5161260847121671666" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-2694732565006467150?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/2694732565006467150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=2694732565006467150' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/2694732565006467150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/2694732565006467150'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/01/example-ivy-ivysettingsxml-for.html' title='Example ivy ivysettings.xml for artifactory repository'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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/_boBGNT85DDE/R6B7ZRnRpfI/AAAAAAAAACM/1JUi_kE_mOQ/s72-c/ivysettings.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32119691.post-3152470023321815462</id><published>2008-01-29T12:28:00.000-08:00</published><updated>2008-01-30T06:37:39.037-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='artifactory'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><title type='text'>How to create project directory structure with maven archetype plugin</title><content type='html'>Nowadays i am working on a new dynamic web project which uses spring-hibernate-richfaces trio.My first task to set up development environment of project.It involves many steps.I will write sth about it occasionally.&lt;br /&gt;&lt;br /&gt;Here I will use Maven Archetype plugin to create directory structure of my project.Assume that dynamic webproject has 3 directory initially.&lt;br /&gt;&lt;br /&gt;core&lt;br /&gt;web&lt;br /&gt;security&lt;br /&gt;&lt;br /&gt;Because we will created an internal artifactory repository and configured it we dont care about jars anymore.Project will be simply involves java classes,resources like gifs,jpegs for web side,and our pom.xmls.Jars will reside in M2_REPO which is = Your home\.m2\repository as default.&lt;br /&gt;&lt;br /&gt;1.Create an empty directory e.g myproject&lt;br /&gt;2.Go inside it&lt;br /&gt;3.write in command prompt&lt;br /&gt;&lt;br /&gt;mvn archetype:create -DgroupId=com.mycompany.myproject.core&lt;br /&gt;-DartifactId=myproject-core -DarchetypeArtifactId=maven-archetype-quickstart&lt;br /&gt;&lt;br /&gt;It will create myproject-core directory.&lt;br /&gt;&lt;br /&gt;4.write in command prompt&lt;br /&gt;&lt;br /&gt;mvn archetype:create -DgroupId=com.mycompany.myproject.web&lt;br /&gt;-DartifactId=myproject-web -DarchetypeArtifactId=maven-archetype-webapp&lt;br /&gt;&lt;br /&gt;It will create myproject-web directory.&lt;br /&gt;&lt;br /&gt;5..write in command prompt&lt;br /&gt;&lt;br /&gt;mvn archetype:create-DgroupId=com.mycompany.myproject.security&lt;br /&gt;-DartifactId=myproject-security-DarchetypeArtifactId=maven-archetype-quickstart&lt;br /&gt;&lt;br /&gt;It will create myproject-security directory.&lt;br /&gt;&lt;br /&gt;You will see that every directory has a pattern.Thanks to this plugin you dont need to think about directory structure of your project.&lt;br /&gt;&lt;br /&gt;For more information&lt;br /&gt;&lt;a href="http://maven.apache.org/plugins/maven-archetype-plugin/"&gt;http://maven.apache.org/plugins/maven-archetype-plugin/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-3152470023321815462?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/3152470023321815462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=3152470023321815462' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/3152470023321815462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/3152470023321815462'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/01/how-to-create-project-directory.html' title='How to create project directory structure with maven archetype plugin'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-4173658774401699670</id><published>2008-01-28T05:38:00.000-08:00</published><updated>2008-01-30T06:38:08.463-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ant'/><category scheme='http://www.blogger.com/atom/ns#' term='artifactory'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><title type='text'>Ant -Maven War:Ivy on the battlefield</title><content type='html'>&lt;a href="http://ant.apache.org/ivy/index.html"&gt;Ivy&lt;/a&gt; is the new graduated dependency manager from &lt;a href="http://ant.apache.org/"&gt;&lt;span style="font-weight: bold;"&gt;Apache&lt;/span&gt; Ant project&lt;/a&gt; which is  counterattack to &lt;a href="http://maven.apache.org/"&gt;&lt;span style="font-weight: bold;"&gt;Apache&lt;/span&gt; Maven project &lt;/a&gt;.&lt;br /&gt;Which option is good for you?&lt;br /&gt;Using ant as a build tool and then configure it via ivy maven-like behavior?Or&lt;br /&gt;Using maven as a build tool and then use maven-ant tasks to get ant-like behavior?&lt;br /&gt;You can find comparision of this tools in their website from 2 different perspectives.&lt;br /&gt;It s up to you choose one of them.But in our internal repository server example I didnt correctly configure ivy to get jars from repository. Ivy can download jars from my repository if they are there.But if there are no jars to download artifactory can't get jars from internet which is default behaviour when I use maven.Maybe i can find answer or maybe I must use maven and ant tasks simply.who knows?But i like this war.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-4173658774401699670?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/4173658774401699670/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=4173658774401699670' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/4173658774401699670'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/4173658774401699670'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/01/ant-maven-warivy-on-battlefield.html' title='Ant -Maven War:Ivy on the battlefield'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-2076011351353864463</id><published>2008-01-25T15:02:00.000-08:00</published><updated>2008-01-30T07:11:29.095-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='artifactory'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><title type='text'>Example maven settings.xml for artifactory repository</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_boBGNT85DDE/R5p44RnRpYI/AAAAAAAAABU/-bZ4IbHpSeA/s1600-h/settings.JPG"&gt;&lt;img style="cursor: pointer; width: 219px; height: 262px;" src="http://3.bp.blogspot.com/_boBGNT85DDE/R5p44RnRpYI/AAAAAAAAABU/-bZ4IbHpSeA/s320/settings.JPG" alt="" id="BLOGGER_PHOTO_ID_5159569231302468994" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;maven settings.xml file may look like this picture&lt;br /&gt;xx.xx.xx.xx :stands for internal server ip address&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-2076011351353864463?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/2076011351353864463/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=2076011351353864463' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/2076011351353864463'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/2076011351353864463'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/01/example-maven-settingsxml-for.html' title='Example maven settings.xml for artifactory repository'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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/_boBGNT85DDE/R5p44RnRpYI/AAAAAAAAABU/-bZ4IbHpSeA/s72-c/settings.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32119691.post-3755563573960431949</id><published>2008-01-25T14:44:00.000-08:00</published><updated>2008-01-30T07:12:30.675-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='artifactory'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><title type='text'>Configuring an internal maven repository with artifactory in Linux server</title><content type='html'>After you have successfully started artifactory service as root you need to go&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;http://localhost:8081/artifactory  OR in our case&lt;br /&gt;http://[serverip]:[serverport]/artifactory&lt;br /&gt;&lt;br /&gt;[serverport] :&lt;/span&gt; Artifactory comes with an artifactory.war file.When you start artifactory service it deploys it to jetty server which comes with artifactory.So  serverport must point to used webserver default port where artifactory.war is deployed. Here in this case it is 8081 for jetty.For tomcat it 8080 as you forecast.&lt;br /&gt;&lt;br /&gt;For first-time admin log in&lt;br /&gt;username :admin&lt;br /&gt;password  :password&lt;br /&gt;&lt;br /&gt;If you can't log in try to reinstall artifactory.May be some files that you dont know and already exists there override default behaviour which is extremely rare case but take my 4 hours.Be sure that files are yours and clean.&lt;br /&gt;&lt;br /&gt;Now you successfully log in to web ui of artifactory.You can deploy your jars,versioning it,do some security settings here.It is the easy part to do.&lt;br /&gt;&lt;br /&gt;But it is not the end. We want some behaviour from artifactory repository:&lt;br /&gt;&lt;br /&gt;We want artifactory to  download needed jars for our project on our internal server so each team member can download jars from internal server and don't have to go Maven Repository or other repositories on the internet. If server doesnt find needed jar on  itself  It (Server!) download jars on itself after maven command executed by one of the team members.&lt;br /&gt;&lt;br /&gt;We should do some configuration to get these behaviour.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-3755563573960431949?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/3755563573960431949/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=3755563573960431949' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/3755563573960431949'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/3755563573960431949'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/01/configuring-internal-maven-repository.html' title='Configuring an internal maven repository with artifactory in Linux server'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-4093321738409131380</id><published>2008-01-25T04:24:00.000-08:00</published><updated>2008-01-30T07:13:15.112-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='artifactory'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><title type='text'>Setting up an internal maven repository with artifactory in Linux server</title><content type='html'>&lt;span style="font-weight: bold;"&gt;First of all i assume that you login as a root to linux.It s neccessary to be root for executing service.&lt;br /&gt;&lt;br /&gt;./install.sh [arg1] :  &lt;/span&gt;This is expected to install artifactory as a linux service. [arg1] is the username of the JETTY_USER.Default is jetty.If you want to override (what i do) you can pass it an argument.(like &lt;span style="color: rgb(255, 102, 102);"&gt;artifactory&lt;/span&gt;)&lt;br /&gt;&lt;br /&gt;my ARTIFACTORY_HOME is:&lt;br /&gt;/opt/artifactory&lt;br /&gt;&lt;br /&gt;and under ARTIFACTORY_HOME there is etc folder.Under etc execute&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;vi default&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;It should like this:&lt;br /&gt;************************&lt;br /&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;export JAVA_HOME=/opt/java/jre1.5.0_14&lt;br /&gt;export JAVA_OPTIONS="-server -Xms400m -Xmx1g"&lt;br /&gt;&lt;br /&gt;export ARTIFACTORY_HOME=/opt/artifactory&lt;br /&gt;&lt;br /&gt;export JETTY_USER=&lt;span style="color: rgb(255, 102, 102);"&gt;artifactory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;export JETTY_CONSOLE=${ARTIFACTORY_HOME}/logs/consoleout.log&lt;br /&gt;*************************&lt;br /&gt;JAVA_HOME should point to your jre folder.&lt;br /&gt;JETTY_CONSOLE is where you can find log when artifactory start or may be failed to start which means 1.5 days for me.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;Because my JETTY_USER is 'artifactory' there must be a user setting in /etc/init.d/artifactory.&lt;br /&gt;This /etc/init.d/artifactory user &lt;span style="font-weight: bold;"&gt;MUST have &lt;/span&gt;read/write access to artifactory folder.So i suggest you to as a begginner in /opt/artifactory folder and simply write&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;chmod -R 777 *&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and give full access to everybody just for beginning.You can easily configure it when you became more familiar to artifactory/linux/maven blah blah issues.&lt;br /&gt;&lt;br /&gt;and here we go&lt;br /&gt;we want to start artifactory via:&lt;br /&gt;  &lt;span style="font-weight: bold;"&gt;   service artifactory start&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;If it says what the hell artifactory service is it means you did sth wrong so stop here and go steps above.Look at /opt/artifactory/etc/default  file to check settings are correct.&lt;br /&gt;&lt;br /&gt;I suggest you to open another session to linux server before executing start artifactory service  and go to /opt/artifactory/logs folder&lt;br /&gt;write :&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;     tail -f consoleout.log&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;to see what is going on there&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;If it is successfully started you are lucky:) Almost every try i have a problem so be patient.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;There are popular known errors:&lt;br /&gt;    &lt;/span&gt; java.lang.RuntimeException: Failed to read object from stream.&lt;br /&gt;   Failed to execute JcrCallback : FileNotFoundException on tmp file&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I hope you successfully installed artifactory and now you can configure it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-4093321738409131380?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/4093321738409131380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=4093321738409131380' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/4093321738409131380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/4093321738409131380'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/01/setting-up-internal-maven-repository.html' title='Setting up an internal maven repository with artifactory in Linux server'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32119691.post-7811632849046918852</id><published>2008-01-22T07:13:00.000-08:00</published><updated>2008-01-30T07:16:08.020-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='article'/><title type='text'>Object Mentor</title><content type='html'>&lt;a href="http://www.objectmentor.com/resources/publishedArticles.html"&gt;http://www.objectmentor.com/resources/publishedArticles.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Very useful for software development.Especially &lt;span style="font-weight: bold;"&gt;Articles For Craftsman &lt;/span&gt;section. You can begin your jouney as an apprentice of Master Mr.C...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-7811632849046918852?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/7811632849046918852/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=7811632849046918852' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/7811632849046918852'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/7811632849046918852'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2008/01/object-mentor.html' title='Object Mentor'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-8470204958794861794</id><published>2007-12-24T07:39:00.000-08:00</published><updated>2008-02-01T05:07:02.316-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='test'/><title type='text'>The way of testivus</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Good test fails&lt;/span&gt;&lt;br /&gt; The pupil went to the master programmer and said:&lt;br /&gt;“All my tests pass all the time. Don’t I deserve a raise?”&lt;br /&gt;The master slapped the pupil and replied:&lt;br /&gt;“If all your tests pass, all the time, you need to write better tests.”&lt;br /&gt;With a red cheek, the pupil went to HR to complain.&lt;br /&gt; But that’s another story.&lt;br /&gt;&lt;br /&gt;Enjoy the way of testivus in www.junitfactory.com . Write  tests write tests tests tests...........&lt;img src="file:///D:/DOCUME%7E1/sakar/LOCALS%7E1/Temp/moz-screenshot.jpg" alt="" /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-8470204958794861794?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/8470204958794861794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=8470204958794861794' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/8470204958794861794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/8470204958794861794'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/12/way-of-testivus.html' title='The way of testivus'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-3482367169159051364</id><published>2007-12-19T03:06:00.000-08:00</published><updated>2008-01-30T07:16:51.734-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java compiler'/><title type='text'>Interesting java compiler errors#1</title><content type='html'>public class Test2 {&lt;br /&gt;public enum Dogs {collie, harrier, shepherd};&lt;br /&gt;public static void main(String [] args) {&lt;br /&gt;Dogs myDog = Dogs.shepherd;&lt;br /&gt;switch (myDog) {&lt;br /&gt;case Dogs.collie:&lt;br /&gt;System.out.print("collie ");&lt;br /&gt;default:&lt;br /&gt;System.out.print("retriever ");&lt;br /&gt;case harrier:&lt;br /&gt;System.out.print("harrier ");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;what is the error?&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;an enum switch case label must be the unqualified name of an enumeration constant&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-3482367169159051364?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/3482367169159051364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=3482367169159051364' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/3482367169159051364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/3482367169159051364'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/12/interesting-java-compiler-errors1.html' title='Interesting java compiler errors#1'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-4972324844219057525</id><published>2007-11-30T00:52:00.000-08:00</published><updated>2008-01-30T07:17:57.218-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='spring'/><category scheme='http://www.blogger.com/atom/ns#' term='jsf'/><title type='text'>JSF-Spring Integration</title><content type='html'>&lt;span style="font-family:arial;"&gt;If you follow &lt;/span&gt;&lt;a style="font-family: arial;" href="http://jsf-spring.sourceforge.net/quickstart.shtml"&gt;this link&lt;/a&gt;&lt;span style="font-family:arial;"&gt; you can easily your existing  web application which uses JSF  with spring.&lt;br /&gt;But&lt;/span&gt;&lt;span style="font-family:arial;"&gt; when you run tomcat 6.0 you can take this output in console.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;java.lang.IllegalStateException: No thread-bound request found: Are you&lt;/span&gt;&lt;br /&gt;&lt;pre style="font-family: arial;"&gt;&gt; referring to request attributes outside of an actual web request?&lt;br /&gt;&gt; If you are actually operating within a web request and still receive this&lt;br /&gt;&gt; message,your code is probably running outside of&lt;br /&gt;&gt; DispatcherServlet/DispatcherPortlet: In this case, use&lt;br /&gt;&gt; RequestContextListener or RequestContextFilter to expose the current&lt;br /&gt;&gt; request.&lt;br /&gt;&lt;br /&gt;It is because of this:&lt;br /&gt;&lt;a href="http://www.jdocs.com/page/AjaxSourceCode?oid=62833"&gt;http://www.jdocs.com/page/AjaxSourceCode?oid=62833&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;at line 102&lt;br /&gt;&lt;br /&gt;You can fix it with modify your web.xml. Add this listener to your web.xml&lt;br /&gt;&lt;br /&gt;&lt;listener&gt;&lt;listener-class&gt;org.springframework.web.context.request.RequestContextListener&lt;/listener-class&gt;&lt;br /&gt;&lt;/listener&gt;&lt;br /&gt;&lt;br /&gt;As a result, your working web.xml should contain listeners below.&lt;listener-class&gt;&lt;/listener-class&gt;&lt;br /&gt;&lt;listener&gt;//listeners&lt;br /&gt;&lt;listener-class&gt;com.sun.faces.config.ConfigureListener&lt;/listener-class&gt;&lt;/listener&gt;&lt;listener&gt;&lt;br /&gt;&lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;&lt;/listener&gt;&lt;listener&gt;&lt;br /&gt;&lt;listener-class&gt;org.springframework.web.context.request.RequestContextListener&lt;/listener-class&gt;&lt;/listener&gt;&lt;listener&gt;&lt;br /&gt;&lt;listener-class&gt;de.mindmatters.faces.spring.context.ContextLoaderListener&lt;/listener-class&gt;&lt;/listener&gt;&lt;br /&gt;//end of listeners&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-4972324844219057525?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/4972324844219057525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=4972324844219057525' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/4972324844219057525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/4972324844219057525'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/11/jsf-spring-integration.html' title='JSF-Spring Integration'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-4866072429043178065</id><published>2007-10-18T04:38:00.000-07:00</published><updated>2008-01-30T07:18:35.433-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='article'/><title type='text'>Does Java pass by reference or pass by value?</title><content type='html'>&lt;a href="http://www.javaworld.com/javaworld/javaqa/2000-05/03-qa-0526-pass.html"&gt;Link&lt;/a&gt;&lt;br /&gt;&lt;span style="display: block;" id="formatbar_Buttons"&gt;&lt;span class="on down" style="display: block;" id="formatbar_ForeColor" title="Metin Rengi" onmouseover="ButtonHoverOn(this);" onmouseout="ButtonHoverOff(this);" onmouseup="" onmousedown="CheckFormatting(event);SelectColor(this,'ForeColor');ButtonMouseDown(this);"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;Java copies and passes the &lt;em&gt;reference&lt;/em&gt; by value, not the object. Thus, method manipulation will alter the objects, since the references point to the original objects. But since the references are copies, swaps will fail. Unfortunately, after a method call, you are left with only the unswapped original references. For a swap to succeed outside of the method call, we need to swap the original references, not the copies.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;-------------------------------------------------------------------------------------------------&lt;/span&gt;&lt;br /&gt;int x = 5;&lt;br /&gt;int y = 7;&lt;br /&gt;&lt;br /&gt;int tmp = x;&lt;br /&gt;x = y;&lt;br /&gt;y = tmp,&lt;br /&gt;&lt;br /&gt;If all your variables are local to one method, it doesn't matter whether&lt;br /&gt;they are primitives or references, you can use their values any way you&lt;br /&gt;like.&lt;br /&gt;The problem, which you don't seem to have grasped, comes when these&lt;br /&gt;variables are passed onto other methods.&lt;br /&gt;&lt;br /&gt;In C you can do this:&lt;br /&gt;&lt;br /&gt;void swap(int *x, int *y) {&lt;br /&gt;int tmp = *x;&lt;br /&gt;*x = *y;&lt;br /&gt;*y = tmp;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;In Java, you can't. Not with primitive types, anyway. But if you have&lt;br /&gt;some sort of wrapper object, you can do this:&lt;br /&gt;&lt;br /&gt;void swap(IntWrapper x, IntWrapper y) {&lt;br /&gt;int tmp = x.getValue();&lt;br /&gt;x.setValue(y.getValue());&lt;br /&gt;y.setValue(tmp);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;You can't do this with java.lang.Integer as it doesn't have methods to&lt;br /&gt;change its value, but you can write your own wrapper class.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.velocityreviews.com/forums/t134583-swap-method-in-java.html"&gt;int wrapper(sth old)&lt;br /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-4866072429043178065?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/4866072429043178065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=4866072429043178065' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/4866072429043178065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/4866072429043178065'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/10/does-java-pass-by-reference-or-pass-by.html' title='Does Java pass by reference or pass by value?'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-274485593362627389</id><published>2007-07-31T05:32:00.000-07:00</published><updated>2008-01-30T07:19:27.488-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sata'/><title type='text'>how to install windows xp to sata disk notebook</title><content type='html'>1.Enter boot menu&lt;br /&gt;2.Advanced-AHCI Configuration  make it disabled&lt;br /&gt;3.Install xp now!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-274485593362627389?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/274485593362627389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=274485593362627389' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/274485593362627389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/274485593362627389'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/07/how-to-install-windows-xp-to-sata-disk.html' title='how to install windows xp to sata disk notebook'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-6379587922487213019</id><published>2007-04-24T16:18:00.000-07:00</published><updated>2008-02-04T07:00:14.662-08:00</updated><title type='text'>About codes</title><content type='html'>All codes are written and tested by me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-6379587922487213019?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/6379587922487213019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=6379587922487213019' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6379587922487213019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6379587922487213019'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/04/about-codes.html' title='About codes'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-6407708942741416446</id><published>2007-04-24T16:09:00.000-07:00</published><updated>2008-01-30T07:21:14.103-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><category scheme='http://www.blogger.com/atom/ns#' term='java servlets'/><title type='text'>how to send image from  mobile phone to servlet :Server Side</title><content type='html'>BufferedReader reader = request.getReader();&lt;br /&gt;       ByteArrayOutputStream bStrm = new ByteArrayOutputStream();&lt;br /&gt;       int width=160;&lt;br /&gt;       int height=120;&lt;br /&gt;       int [] pixels = new int[width*height];&lt;br /&gt;       int ch;&lt;br /&gt;       BufferedImage img=&lt;br /&gt;new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);&lt;br /&gt;&lt;br /&gt;       FileWriter fw1;&lt;br /&gt;       BufferedWriter bw1=null;&lt;br /&gt;       try{ &lt;br /&gt;        File myfile = new File("C:\\picture.jpg");&lt;br /&gt;     &lt;br /&gt;        fw1 = new FileWriter("C:\\imagedata.txt");&lt;br /&gt;        bw1 = new BufferedWriter(fw1);&lt;br /&gt;       for(int  i =0;i LT 120;i++){&lt;br /&gt;         for(int j=0;j LT 160;j++){&lt;br /&gt;           reader.skip(1);&lt;br /&gt;           ch=reader.read();&lt;br /&gt;           while ((ch = reader.read()) != '?')&lt;br /&gt;            bStrm.write(ch);   &lt;br /&gt;           String str = new String(bStrm.toByteArray()); &lt;br /&gt;           pixels[i*160+j] = Integer.parseInt(str);&lt;br /&gt;           bw1.write(""+pixels[i*160+j]);&lt;br /&gt;           bStrm.reset();&lt;br /&gt;       &lt;br /&gt;         }&lt;br /&gt;         bw1.newLine();&lt;br /&gt;        }&lt;br /&gt;         img.setRGB(0,0,160,120,pixels,0,160);   &lt;br /&gt;        ImageIO.write(img,"jpg",myfile);&lt;br /&gt;       }catch(Exception e){&lt;br /&gt;&lt;br /&gt;       }&lt;br /&gt;       bw1.close();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-6407708942741416446?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/6407708942741416446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=6407708942741416446' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6407708942741416446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6407708942741416446'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/04/how-to-send-image-from-mobile-phone-to_24.html' title='how to send image from  mobile phone to servlet :Server Side'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-6887756270019467137</id><published>2007-04-24T16:01:00.000-07:00</published><updated>2008-01-30T07:22:34.791-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><category scheme='http://www.blogger.com/atom/ns#' term='java servlets'/><title type='text'>how to send image from  mobile phone to servlet :Mobile Side</title><content type='html'>public synchronized void run(){&lt;br /&gt;   HttpConnection c = null;&lt;br /&gt;   OutputStream os = null;&lt;br /&gt;   try{&lt;br /&gt;   c = (HttpConnection)Connector.open(url);&lt;br /&gt;   // Set the request method and headers&lt;br /&gt;   c.setRequestMethod(HttpConnection.POST);&lt;br /&gt;   c.setRequestProperty("User-Agent",&lt;br /&gt;            "Profile/MIDP-2.0 Configuration/CLDC-1.0");&lt;br /&gt;   c.setRequestProperty("Content-Language", "en-US");&lt;br /&gt;   os = c.openOutputStream();&lt;br /&gt;    Image myimage = Image.createImage(imageData,0,imageData.length);&lt;br /&gt;    int w = myimage.getWidth();&lt;br /&gt;    int h = myimage.getHeight();&lt;br /&gt;    DataOutputStream out = new DataOutputStream(os);&lt;br /&gt;    System.out.println("width:"+myimage.getWidth());&lt;br /&gt;    System.out.println("height:"+myimage.getHeight());&lt;br /&gt;    int [] rgbdata = new int[160*120];&lt;br /&gt;    System.out.println("length :"+rgbdata.length);&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;        myimage.getRGB(rgbdata, 0, myimage.getWidth(), 0, 0, myimage.getWidth(), myimage.getHeight());&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    for(int i = 0 ;i &lt;span style="font-weight: bold;"&gt;LT&lt;/span&gt; h;i++){&lt;br /&gt;        for(int j=0;j &lt;span style="font-weight: bold;"&gt;LT&lt;/span&gt; w;j++){&lt;br /&gt;          out.writeUTF(rgbdata[i*w+j]+"?");&lt;br /&gt;       }&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;   catch(Exception e){&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/32119691-6887756270019467137?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/6887756270019467137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=6887756270019467137' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6887756270019467137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6887756270019467137'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/04/how-to-send-image-from-mobile-phone-to.html' title='how to send image from  mobile phone to servlet :Mobile Side'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-1611394512412425871</id><published>2007-04-06T12:34:00.000-07:00</published><updated>2008-01-30T07:23:29.082-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><title type='text'>Image Sending Test</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_boBGNT85DDE/RhaksImwzuI/AAAAAAAAAAs/NB9TwkRrLZ8/s1600-h/asd.bmp"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_boBGNT85DDE/RhaksImwzuI/AAAAAAAAAAs/NB9TwkRrLZ8/s320/asd.bmp" alt="" id="BLOGGER_PHOTO_ID_5050405110273855202" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Codes in the last 2 post is tested in netbeans Ide 5.5 and passed successfully.It can transfer 225kb bmp image that you see left successfully.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-1611394512412425871?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/1611394512412425871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=1611394512412425871' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/1611394512412425871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/1611394512412425871'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/04/image-sending-test.html' title='Image Sending Test'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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/_boBGNT85DDE/RhaksImwzuI/AAAAAAAAAAs/NB9TwkRrLZ8/s72-c/asd.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32119691.post-7291848233833249513</id><published>2007-04-06T12:29:00.000-07:00</published><updated>2008-01-30T07:24:10.520-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><category scheme='http://www.blogger.com/atom/ns#' term='java servlets'/><title type='text'>how to send image from servlet to mobile phone</title><content type='html'>Mobile side:&lt;br /&gt;&lt;br /&gt;Do reverse what you did in server side&lt;br /&gt;Create image with Image.createImage(....)&lt;br /&gt;*GetImage :starting midlet&lt;br /&gt;Here is the Java Code&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;* HttpConnector2.java&lt;br /&gt;*&lt;br /&gt;* Created on February 20, 2007, 6:20 PM&lt;br /&gt;*&lt;br /&gt;* To change this template, choose Tools | Template Manager&lt;br /&gt;* and open the template in the editor.&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;package hello;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;*&lt;br /&gt;* @author sezer&lt;br /&gt;*/&lt;br /&gt;import java.io.*;&lt;br /&gt;import javax.microedition.io.*;&lt;br /&gt;import javax.microedition.midlet.*;&lt;br /&gt;import javax.microedition.lcdui.*;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class HttpConnector2 extends Thread{&lt;br /&gt;  &lt;br /&gt;   private  String url="your url";&lt;br /&gt;   private  String msg;&lt;br /&gt;   private  GetImage midlet;&lt;br /&gt;&lt;br /&gt;  &lt;br /&gt; &lt;br /&gt;   /** Creates a new instance of HttpConnector */&lt;br /&gt;   public HttpConnector2(GetImage midlet,String msg) {&lt;br /&gt;       this.midlet =midlet;&lt;br /&gt;       this.msg = msg;&lt;br /&gt;   }&lt;br /&gt;   public synchronized void run(){&lt;br /&gt;      HttpConnection c = null;&lt;br /&gt;      InputStream is = null;&lt;br /&gt;      OutputStream os = null;&lt;br /&gt;      try{&lt;br /&gt;      c = (HttpConnection)Connector.open(url);&lt;br /&gt;      // Set the request method and headers&lt;br /&gt;      c.setRequestMethod(HttpConnection.POST);&lt;br /&gt;      c.setRequestProperty("User-Agent",&lt;br /&gt;               "Profile/MIDP-2.0 Configuration/CLDC-1.0");&lt;br /&gt;      c.setRequestProperty("Content-Language", "en-US");&lt;br /&gt;      os = c.openOutputStream();&lt;br /&gt;      os.write(msg.getBytes());&lt;br /&gt;  &lt;br /&gt;       is = c.openInputStream();&lt;br /&gt;      &lt;br /&gt;       ByteArrayOutputStream bStrm = new ByteArrayOutputStream();&lt;br /&gt;      &lt;br /&gt;       int ch;&lt;br /&gt;      &lt;br /&gt;       while((ch=is.read())!='@')&lt;br /&gt;            bStrm.write(ch);&lt;br /&gt;       String widthstr = new String(bStrm.toByteArray());&lt;br /&gt;       System.out.println("Width:"+widthstr);&lt;br /&gt;      &lt;br /&gt;       bStrm.reset();&lt;br /&gt;      &lt;br /&gt;       int width = Integer.parseInt(widthstr);&lt;br /&gt;       System.out.println(width);&lt;br /&gt;      &lt;br /&gt;       while((ch=is.read())!='n')&lt;br /&gt;            bStrm.write(ch);&lt;br /&gt;       String heightstr = new String(bStrm.toByteArray());&lt;br /&gt;       System.out.println("Height:"+heightstr);&lt;br /&gt;      &lt;br /&gt;       bStrm.reset();&lt;br /&gt;      &lt;br /&gt;       int height = Integer.parseInt(heightstr);&lt;br /&gt;       System.out.println(height);&lt;br /&gt;&lt;br /&gt;       int [] pixels = new int[width*height];&lt;br /&gt;      &lt;br /&gt;      for(int  i =0;i &lt;span style="font-weight: bold;"&gt;LT&lt;/span&gt; height;i++){&lt;br /&gt;       for(int j=0;j &lt;span style="font-weight: bold;"&gt;LT&lt;/span&gt; width;j++){&lt;br /&gt;       while ((ch = is.read()) != '?')&lt;br /&gt;         bStrm.write(ch);&lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;         String str = new String(bStrm.toByteArray());&lt;br /&gt;         pixels[i*width+j] = Integer.parseInt(str);&lt;br /&gt;         bStrm.reset();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;       System.out.println(pixels.length);&lt;br /&gt;      &lt;br /&gt;       midlet.get_response(width,height,pixels);&lt;br /&gt;       os.close();&lt;br /&gt;       is.close();&lt;br /&gt;       c.close();&lt;br /&gt;      }&lt;br /&gt;      catch(IOException ioe){&lt;br /&gt;           ioe.printStackTrace();&lt;br /&gt;      }&lt;br /&gt;   }   &lt;br /&gt;}&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;LT&lt;/span&gt; is '&lt;' as usual&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-7291848233833249513?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/7291848233833249513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=7291848233833249513' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/7291848233833249513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/7291848233833249513'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/04/how-to-send-image-from-servlet-to_06.html' title='how to send image from servlet to mobile phone'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-8658535361571274088</id><published>2007-04-06T12:19:00.000-07:00</published><updated>2008-01-30T07:25:00.873-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><category scheme='http://www.blogger.com/atom/ns#' term='java servlets'/><title type='text'>how to send image from servlet to mobile phone</title><content type='html'>&lt;span style="font-weight: bold;"&gt;Server side&lt;/span&gt;&lt;br /&gt;Read image&lt;br /&gt;send width&lt;br /&gt;send height&lt;br /&gt;while(MorePixels){&lt;br /&gt;Take a pixel from getRGB(x,y)&lt;br /&gt;Put a split character&lt;br /&gt;send it&lt;br /&gt;}&lt;br /&gt;here is the JAVA code:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;* BTServlet.java&lt;br /&gt;*&lt;br /&gt;* Created on February 12, 2007, 9:45 PM&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;package servlet;&lt;br /&gt;&lt;br /&gt;import java.io.*;&lt;br /&gt;import java.net.*;&lt;br /&gt;import java.awt.image.*;&lt;br /&gt;import javax.servlet.*;&lt;br /&gt;import javax.servlet.http.*;&lt;br /&gt;import javax.imageio.ImageIO;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;*&lt;br /&gt;* @author sezer&lt;br /&gt;* @version&lt;br /&gt;*/&lt;br /&gt;public class BTServlet extends HttpServlet {&lt;br /&gt;  &lt;br /&gt;   /** Processes requests for both HTTP &lt;code&gt;GET&lt;/code&gt; and &lt;code&gt;POST&lt;/code&gt; methods.&lt;br /&gt;    * @param request servlet request&lt;br /&gt;    * @param response servlet response&lt;br /&gt;    */&lt;br /&gt;   protected void processRequest(HttpServletRequest request, HttpServletResponse response)&lt;br /&gt;   throws ServletException, IOException {&lt;br /&gt;       BufferedReader reader = request.getReader();&lt;br /&gt;       String msg = reader.readLine();&lt;br /&gt;       response.setContentType("text/html;charset=UTF-8");&lt;br /&gt;&lt;br /&gt;       PrintWriter out = response.getWriter();&lt;br /&gt;     &lt;br /&gt;       BufferedImage bufImg=null;&lt;br /&gt;       try{&lt;br /&gt;           File f = new File("C:\\picture.png");&lt;br /&gt;           bufImg = ImageIO.read(f);&lt;br /&gt;       }&lt;br /&gt;       catch(IOException e){&lt;br /&gt;           e.printStackTrace();&lt;br /&gt;       }&lt;br /&gt;      &lt;br /&gt;      &lt;br /&gt;       int w = bufImg.getWidth();&lt;br /&gt;       int h = bufImg.getHeight();&lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;       System.out.println("width:"+w);&lt;br /&gt;       System.out.println("height:"+h);&lt;br /&gt;      &lt;br /&gt;      &lt;br /&gt;&lt;br /&gt;      &lt;br /&gt;        out.print(w+"@"+h+"n");&lt;br /&gt;      &lt;br /&gt;      &lt;br /&gt;        for(int i = 0 ;i &lt;span style="font-weight: bold;"&gt;LT&lt;/span&gt; h;i++){&lt;br /&gt;           for(int j=0;j  &lt;span style="font-weight: bold;"&gt;LT&lt;/span&gt; w;j++){&lt;br /&gt;              out.print(bufImg.getRGB(j,i)+"?");&lt;br /&gt;           }&lt;br /&gt;    &lt;br /&gt;       }&lt;br /&gt;       &lt;br /&gt;       out.flush();&lt;br /&gt;       out.close();&lt;br /&gt;   }&lt;br /&gt; }&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;LT&lt;/span&gt;   : is '&lt;'&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-8658535361571274088?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/8658535361571274088/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=8658535361571274088' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/8658535361571274088'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/8658535361571274088'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/04/how-to-send-image-from-servlet-to.html' title='how to send image from servlet to mobile phone'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-4591859941938980535</id><published>2007-03-06T11:15:00.000-08:00</published><updated>2008-01-30T07:25:33.408-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><title type='text'>my j2me camera program snapshots #3</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_boBGNT85DDE/Re2-SC6nR2I/AAAAAAAAAAc/DK-HryCSChw/s1600-h/image3.bmp"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://3.bp.blogspot.com/_boBGNT85DDE/Re2-SC6nR2I/AAAAAAAAAAc/DK-HryCSChw/s320/image3.bmp" alt="" id="BLOGGER_PHOTO_ID_5038892775327090530" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-4591859941938980535?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/4591859941938980535/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=4591859941938980535' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/4591859941938980535'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/4591859941938980535'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/03/my-j2me-camera-program-snapshots-3.html' title='my j2me camera program snapshots #3'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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/_boBGNT85DDE/Re2-SC6nR2I/AAAAAAAAAAc/DK-HryCSChw/s72-c/image3.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32119691.post-3336738241618153511</id><published>2007-03-06T11:11:00.000-08:00</published><updated>2008-01-30T07:25:51.427-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><title type='text'>my j2me camera program snapshots #2</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_boBGNT85DDE/Re29ni6nR1I/AAAAAAAAAAU/QYJA6_YvZnY/s1600-h/image2.bmp"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_boBGNT85DDE/Re29ni6nR1I/AAAAAAAAAAU/QYJA6_YvZnY/s320/image2.bmp" alt="" id="BLOGGER_PHOTO_ID_5038892045182650194" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-3336738241618153511?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/3336738241618153511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=3336738241618153511' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/3336738241618153511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/3336738241618153511'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/03/my-j2me-camera-program-snapshots-2.html' title='my j2me camera program snapshots #2'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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/_boBGNT85DDE/Re29ni6nR1I/AAAAAAAAAAU/QYJA6_YvZnY/s72-c/image2.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32119691.post-7337705681917066565</id><published>2007-03-06T09:48:00.000-08:00</published><updated>2008-01-30T07:26:09.601-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><title type='text'>my j2me camera program snapshots #1</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_boBGNT85DDE/Re2rKy6nR0I/AAAAAAAAAAM/86uw54PM0zs/s1600-h/image1.bmp"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/_boBGNT85DDE/Re2rKy6nR0I/AAAAAAAAAAM/86uw54PM0zs/s320/image1.bmp" alt="" id="BLOGGER_PHOTO_ID_5038871760052111170" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-7337705681917066565?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/7337705681917066565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=7337705681917066565' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/7337705681917066565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/7337705681917066565'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/03/my-j2me-camera-program-snapshots-1.html' title='my j2me camera program snapshots #1'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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/_boBGNT85DDE/Re2rKy6nR0I/AAAAAAAAAAM/86uw54PM0zs/s72-c/image1.bmp' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32119691.post-6282289980868961518</id><published>2007-03-06T09:13:00.000-08:00</published><updated>2008-01-30T07:27:02.350-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><title type='text'>Code:How to write an image in mmapi</title><content type='html'>&lt;span style="font-weight: bold;"&gt;How to write an image in mmapi?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I installed and executed this code in my old fashion nokia 6600.&lt;br /&gt;           String name;&lt;br /&gt;           int recId;  // returned by addRecord but not used&lt;br /&gt;           TextField tmp = (TextField)get_saveForm().get(0);&lt;br /&gt;           name = tmp.getString();&lt;br /&gt;           int width = image.getWidth();&lt;br /&gt;           int height = image.getHeight();&lt;br /&gt;           byte [] rgbData = pngData;//&lt;br /&gt;           ByteArrayOutputStream baos = new ByteArrayOutputStream();&lt;br /&gt;    DataOutputStream outputStream = new DataOutputStream(baos);&lt;br /&gt;           try{&lt;br /&gt;             imageStore = RecordStore.openRecordStore("myimages",true);//image store  name&lt;br /&gt;            outputStream.writeUTF(name);&lt;br /&gt;            outputStream.writeInt(width);&lt;br /&gt;            outputStream.writeInt(height);&lt;br /&gt;            outputStream.writeInt(rgbData.length);&lt;br /&gt;            for(int i=0;i  &lt;span style="font-weight: bold;"&gt;TO &lt;/span&gt;rgbData.length;i++)&lt;br /&gt;                outputStream.writeByte(rgbData[i]);//write byte and forget out of memory error!&lt;br /&gt;           &lt;br /&gt;            outputStream.flush();&lt;br /&gt;            outputStream.close();&lt;br /&gt;            byte[] b = baos.toByteArray();&lt;br /&gt;            recId = imageStore.addRecord(b, 0, b.length);&lt;br /&gt;        //    Alert alert = new Alert("ImageSaved" ,name +" Saved",null,AlertType.INFO);&lt;br /&gt;         //   Display.getDisplay(midlet).setCurrent(alert,this);&lt;br /&gt;            Display.getDisplay(midlet).setCurrent(this);&lt;br /&gt;         //   System.out.println("Image Saved");&lt;br /&gt;           }catch(IOException ioe){&lt;br /&gt;              Alert alert = new Alert("Image" ,name +"IOException",null,AlertType.ERROR);&lt;br /&gt;             Display.getDisplay(midlet).setCurrent(alert,this);&lt;br /&gt;           }&lt;br /&gt;           catch (Exception e) {&lt;br /&gt;           // Log the exception&lt;br /&gt;             Alert alert = new Alert("Image" ,name +" Not Saved",null,AlertType.ERROR);&lt;br /&gt;             Display.getDisplay(midlet).setCurrent(alert,this);&lt;br /&gt;       } finally {&lt;br /&gt;           try {&lt;br /&gt;               // Close the Record Store&lt;br /&gt;               if (imageStore != null) imageStore.closeRecordStore();&lt;br /&gt;           } catch (Exception ignore) {&lt;br /&gt;               // Ignore&lt;br /&gt;                  Alert alert = new Alert("Exception" ,ignore.getMessage(),null,AlertType.ERROR);&lt;br /&gt;                  Display.getDisplay(midlet).setCurrent(alert,this);&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt; &lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;TO&lt;/span&gt; will be '&lt;' i cant write because of HTML error of silly blogspot editor&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-6282289980868961518?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/6282289980868961518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=6282289980868961518' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6282289980868961518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6282289980868961518'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/03/codehow-to-write-image-in-mmapi.html' title='Code:How to write an image in mmapi'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-5647229574388165162</id><published>2007-03-06T09:00:00.000-08:00</published><updated>2008-01-30T07:27:52.044-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><title type='text'>getsnapshot(null) problem in nokia6600</title><content type='html'>In java spec it write that when you give imagetype &lt;span style="font-style: italic;"&gt;null&lt;/span&gt; your mobile phone take snapshot in default imagetype, but forget it!!! when simply you copy paste code and store it via RMS and later  try to retrieve it you ll get an exception!.Where did it come? In Netbeans IDE 5.5 you dont get an exception but when you decide to install and execute your .jar program it simply throw an exception even simply wrote a meaningful expression abou what exception is. Try - catch blocks doesnt really do not anything in my nokia66oo and you can't see anything about problem. You will get an exception which see Exception 0  (oh really??)If you have a problem like this i suggest you give up studying and simply give more attention to your girlfriend :)) When you get ready (your mind is free) look at your device specification then you will get the answer.If you don't get anything,write a better code and give up cursing&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-5647229574388165162?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/5647229574388165162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=5647229574388165162' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/5647229574388165162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/5647229574388165162'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/03/getsnapshotnull-problem-in-nokia6600.html' title='getsnapshot(null) problem in nokia6600'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-6453633328957528626</id><published>2007-03-05T02:23:00.000-08:00</published><updated>2008-01-30T07:28:27.261-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><title type='text'>getSnapshot(java.lang.String imageType) in mmapi</title><content type='html'>getSnapshot(java.lang.String imageType) returns a byte array which is encoded with given imageType.If imageType is null then  default image type will be used.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How to learn supported image types?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;System.out.println(System.getProperty("video.snapshot.encodings"));&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Getting a jpeg image&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;byte[] imageData = videoControl.getSnapshot("encoding=jpeg"); //160x120&lt;br /&gt;byte[] imageData = videoControl.getSnapshot("encoding=jpeg width="200" height="150");&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Getting a png image&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; byte[] imageData = videoControl.getSnapshot("encoding=png"); //160x120&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;image types&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a href="http://en.wikipedia.org/wiki/Png"&gt;http://en.wikipedia.org/wiki/Png&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;a href="http://web.cs.hacettepe.edu.tr/%7Eb20021809/projects/pusu/pivot/entry.php?id=11"&gt;A good comparison&lt;/a&gt; of snapshot speed of the Nokia 6600 in different image types&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-6453633328957528626?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/6453633328957528626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=6453633328957528626' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6453633328957528626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6453633328957528626'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/03/getsnapshotjavalangstring-imagetype-in.html' title='getSnapshot(java.lang.String imageType) in mmapi'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-32119691.post-6552521459935786307</id><published>2007-03-04T17:36:00.000-08:00</published><updated>2008-01-30T07:29:18.313-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><title type='text'>Code example for RMS in j2me</title><content type='html'>&lt;a href="http://developers.sun.com/techtopics/mobility/midp/ttips/imagesinrms/"&gt;An example code&lt;/a&gt; shows how to store and load png images&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-6552521459935786307?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/6552521459935786307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=6552521459935786307' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6552521459935786307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6552521459935786307'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/03/code-example-for-rms-in-j2me.html' title='Code example for RMS in j2me'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-5260200262396059095</id><published>2007-02-28T08:07:00.000-08:00</published><updated>2008-01-30T07:29:49.518-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><title type='text'>Code : how to record data in j2me</title><content type='html'>private RecordStore recordStore=null;&lt;br /&gt;byte [] data=.....&lt;br /&gt;try{&lt;br /&gt;          int id = recordStore.addRecord(data,0,data.length);&lt;br /&gt;       &lt;br /&gt; }catch(RecordStoreException rse){&lt;br /&gt;           &lt;br /&gt; }&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;where data will be recorded?&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;In Nokia6600, E:\System\Midlets\[1012...]\rms.db&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;E                               :    Disk (Memory Card)&lt;br /&gt;[1012...]                   :    midlet number&lt;br /&gt;&lt;br /&gt;You can explore your device with FExplorer and see that when u add a new record size of rms.db will increase.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-5260200262396059095?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/5260200262396059095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=5260200262396059095' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/5260200262396059095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/5260200262396059095'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/02/how-to-record-data-in-j2me.html' title='Code : how to record data in j2me'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-7268454875984315913</id><published>2007-02-27T04:23:00.000-08:00</published><updated>2008-01-30T07:30:17.285-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><title type='text'>Code : how to reach camera in j2me</title><content type='html'>&lt;pre&gt;import javax.microedition.media.*;&lt;br /&gt;import javax.microedition.media.control.*;&lt;br /&gt;&lt;br /&gt;player=Manager.createPlayer("capture://video");&lt;br /&gt;player.realize();&lt;br /&gt;videoControl=(VideoControl)(player.getControl("VideoControl"));&lt;br /&gt;&lt;br /&gt;videoControl.initDisplayMode(VideoControl.USE_DIRECT_VIDEO,&lt;br /&gt;canvas);&lt;br /&gt;&lt;br /&gt;player.start();&lt;br /&gt;&lt;br /&gt;byte[] image = videoControl.getSnapshot(null);&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-7268454875984315913?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/7268454875984315913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=7268454875984315913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/7268454875984315913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/7268454875984315913'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/02/how-to-reach-camera-in-j2me.html' title='Code : how to reach camera in j2me'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-1147234218628548725</id><published>2007-02-26T07:58:00.000-08:00</published><updated>2008-01-30T07:30:53.674-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><title type='text'>how to store data and retrieve</title><content type='html'>&lt;a href="http://java.sun.com/javame/reference/apis/jsr037/javax/microedition/rms/package-summary.html"&gt;Here&lt;/a&gt; is an overview about &lt;span style="font-weight: bold;"&gt;javax.microedition.rms &lt;/span&gt;package which is used for storing data and later retrieving it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-1147234218628548725?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/1147234218628548725/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=1147234218628548725' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/1147234218628548725'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/1147234218628548725'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/02/how-to-store-data-and-retrieve.html' title='how to store data and retrieve'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-8132001280778049531</id><published>2007-02-22T05:13:00.000-08:00</published><updated>2008-01-30T07:31:41.212-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><title type='text'>Installing and Executing j2me applications in real mobile phones</title><content type='html'>&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;Every mobile phone dont support every API and Configuration!&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Remembering  this basic rule rescue you from errors like "File Manager Closed" "Wrong version".&lt;br /&gt;&lt;br /&gt;You can see which  device supports which API  and configuration in J2mepolish website.&lt;br /&gt;&lt;br /&gt;For example if you(like me) try to install a application which has CLDC 1.1 version it may not be installed in Nokia 6600 which supports CLDC 1.0.&lt;br /&gt;&lt;br /&gt;How to install??&lt;br /&gt;&lt;br /&gt;open file manager --&gt;select jar file--&gt;and installing...&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-8132001280778049531?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/8132001280778049531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=8132001280778049531' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/8132001280778049531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/8132001280778049531'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/02/installing-and-executing-j2me.html' title='Installing and Executing j2me applications in real mobile phones'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-663401156216974050</id><published>2007-02-21T10:50:00.000-08:00</published><updated>2008-01-30T07:32:09.893-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><title type='text'>next step</title><content type='html'>The codes below simply send data that user types  to server and receive message from server which is echos of it.Next step doing a file browser, browsing a photo and sending it via HttpConnection.If you send byte you can send everything so  i ll send image in this way.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-663401156216974050?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/663401156216974050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=663401156216974050' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/663401156216974050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/663401156216974050'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/02/next-step.html' title='next step'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-6355576222935478062</id><published>2007-02-21T10:45:00.001-08:00</published><updated>2008-01-30T07:32:59.771-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><title type='text'>Example Code:HttpConnection in J2ME #2</title><content type='html'>&lt;span style="font-weight: bold; color: rgb(204, 0, 0);"&gt;&lt;blockquote&gt;use  SendDataViaHttp.java and  HttpConnector.java together&lt;/blockquote&gt;&lt;/span&gt;/**&lt;br /&gt;*&lt;br /&gt;* @author  sezera.blogspot.com&lt;br /&gt;* @version  0010&lt;br /&gt;*/&lt;br /&gt;import java.io.*;&lt;br /&gt;import javax.microedition.io.*;&lt;br /&gt;import javax.microedition.midlet.*;&lt;br /&gt;import javax.microedition.lcdui.*;&lt;br /&gt;&lt;br /&gt;public class HttpConnector extends Thread{&lt;br /&gt;&lt;br /&gt;private  String url="http://localhost:8084/YourWebApp/YourServlet";&lt;br /&gt;private  String msg;&lt;br /&gt;private  SendDataViaHttp midlet;&lt;br /&gt;/** Creates a new instance of HttpConnector */&lt;br /&gt;public HttpConnector(SendDataViaHttp midlet,String msg) {&lt;br /&gt;   this.midlet =midlet;&lt;br /&gt;   this.msg = msg;&lt;br /&gt;}&lt;br /&gt;public synchronized void run(){&lt;br /&gt;  HttpConnection c = null;&lt;br /&gt;  InputStream is = null;&lt;br /&gt;  OutputStream os = null;&lt;br /&gt;  try{&lt;br /&gt;  c = (HttpConnection)Connector.open(url);&lt;br /&gt;  // Set the request method and headers&lt;br /&gt;  c.setRequestMethod(HttpConnection.POST);&lt;br /&gt;  c.setRequestProperty("User-Agent",&lt;br /&gt;           "Profile/MIDP-2.0 Configuration/CLDC-1.0");&lt;br /&gt;  c.setRequestProperty("Content-Language", "en-US");&lt;br /&gt;  os = c.openOutputStream();&lt;br /&gt;  os.write(msg.getBytes());&lt;br /&gt;&lt;br /&gt;   is = c.openInputStream();&lt;br /&gt;&lt;br /&gt;   int contentLength = (int)c.getLength();&lt;br /&gt;   if (contentLength == -1) contentLength = 255;&lt;br /&gt;   byte[] raw = new byte[contentLength];&lt;br /&gt;   int length = is.read(raw);&lt;br /&gt;   String response = new String(raw,0,length);&lt;br /&gt;   midlet.get_response(response);&lt;br /&gt;   os.close();&lt;br /&gt;   is.close();&lt;br /&gt;   c.close();&lt;br /&gt;  }&lt;br /&gt;  catch(IOException ioe){&lt;br /&gt;       ioe.printStackTrace();&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/32119691-6355576222935478062?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/6355576222935478062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=6355576222935478062' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6355576222935478062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6355576222935478062'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/02/example-codehttpconnection-in-j2me-2.html' title='Example Code:HttpConnection in J2ME #2'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-8233083646375638664</id><published>2007-02-21T10:43:00.001-08:00</published><updated>2008-01-30T07:33:43.154-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><title type='text'>Example Code:HttpConnection in J2ME #1</title><content type='html'>import javax.microedition.midlet.*;&lt;br /&gt;import javax.microedition.lcdui.*;&lt;br /&gt;import javax.microedition.io.*;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;*&lt;br /&gt;* @author  sezera.blogspot.com&lt;br /&gt;* @version  0001&lt;br /&gt;*/&lt;br /&gt;public class SendDataViaHttp extends MIDlet implements CommandListener{&lt;br /&gt;&lt;br /&gt; private Form sendForm;&lt;br /&gt; public TextField sendTextField;&lt;br /&gt; public TextField responseTextField;&lt;br /&gt; private TextBox askUserTextBox;&lt;br /&gt; private Command sendCommand;&lt;br /&gt; private Command exitCommand;&lt;br /&gt; private String msgString;&lt;br /&gt; private String responseString;&lt;br /&gt;&lt;br /&gt; public SendDataViaHttp(){&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public void startApp() {&lt;br /&gt;    getDisplay().setCurrent(get_sendForm());&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public void pauseApp() {&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; public void destroyApp(boolean unconditional) {&lt;br /&gt; }&lt;br /&gt; public Display getDisplay()&lt;br /&gt; {&lt;br /&gt;     return Display.getDisplay(this);&lt;br /&gt; }&lt;br /&gt; public Form get_sendForm()&lt;br /&gt; {&lt;br /&gt;     if(sendForm == null){&lt;br /&gt;         sendForm = new Form(null,new Item[]{get_sendTextField(),get_responseTextField()});&lt;br /&gt;         sendForm.addCommand(get_sendCommand());&lt;br /&gt;         sendForm.addCommand(get_exitCommand());&lt;br /&gt;         sendForm.setCommandListener(this);&lt;br /&gt;     }&lt;br /&gt;     return sendForm;&lt;br /&gt; }&lt;br /&gt; public TextField get_sendTextField(){&lt;br /&gt;     if(sendTextField == null){&lt;br /&gt;         sendTextField = new TextField("Your Message",null,20,TextField.ANY);&lt;br /&gt;     }&lt;br /&gt;     return sendTextField;&lt;br /&gt; }&lt;br /&gt; public TextField get_responseTextField(){&lt;br /&gt;     if(responseTextField == null){&lt;br /&gt;        responseTextField = new TextField("Response From Server",null,20,TextField.ANY);&lt;br /&gt;     }&lt;br /&gt;     return responseTextField;&lt;br /&gt; }&lt;br /&gt; public Command get_sendCommand()&lt;br /&gt; {&lt;br /&gt;     if(sendCommand == null){&lt;br /&gt;         sendCommand = new Command("Send",Command.OK,1);&lt;br /&gt;     }&lt;br /&gt;     return sendCommand;&lt;br /&gt; }&lt;br /&gt; public Command get_exitCommand()&lt;br /&gt; {&lt;br /&gt;     if(exitCommand == null){&lt;br /&gt;         exitCommand = new Command("Exit",Command.EXIT,2);&lt;br /&gt;     }&lt;br /&gt;     return exitCommand;&lt;br /&gt; }&lt;br /&gt; public void commandAction(Command command,Displayable displayable){&lt;br /&gt;     if(displayable == sendForm){&lt;br /&gt;         if(command == sendCommand){&lt;br /&gt;             //send written data to JavaServlet via HttpConnection&lt;br /&gt;             msgString = new String(sendTextField.getString());&lt;br /&gt;             HttpConnector conn = new HttpConnector(this,msgString);&lt;br /&gt;             conn.start();&lt;br /&gt;         }else if(command == exitCommand){&lt;br /&gt;            //exit Midlet&lt;br /&gt;             exitMiddlet();&lt;br /&gt;      &lt;br /&gt;         }&lt;br /&gt;     }else&lt;br /&gt;     {&lt;br /&gt;        getDisplay().setCurrent(get_sendForm());&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt; public void exitMiddlet()&lt;br /&gt; {&lt;br /&gt;    getDisplay().setCurrent(null);&lt;br /&gt;    destroyApp(true);&lt;br /&gt;    notifyDestroyed();&lt;br /&gt; }&lt;br /&gt; public void get_response(String response)&lt;br /&gt; {&lt;br /&gt;    responseTextField.setString(response);&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/32119691-8233083646375638664?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/8233083646375638664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=8233083646375638664' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/8233083646375638664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/8233083646375638664'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/02/example-codehttpconnection-in-j2me.html' title='Example Code:HttpConnection in J2ME #1'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-8334724438076292039</id><published>2007-02-21T03:14:00.000-08:00</published><updated>2008-01-30T07:34:15.493-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><title type='text'>Deadlock problem in J2ME networking</title><content type='html'>&lt;span style="color: rgb(255, 0, 0);"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;Warning: To avoid potential deadlock, operations that may block, such as &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; networking, should be performed in a different thread than the &lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt; commandAction() handler.&lt;/span&gt;&lt;/blockquote&gt;The warning above says if you simply do a httpconnection in J2Me memory,you may cause a deadlock.So we should&lt;span style="color: rgb(51, 51, 255);"&gt; Java Threads &lt;span style="color: rgb(0, 0, 0);"&gt;to connect server and send/receive data.&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-8334724438076292039?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/8334724438076292039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=8334724438076292039' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/8334724438076292039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/8334724438076292039'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/02/deadlock-problem.html' title='Deadlock problem in J2ME networking'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-7727921676200472674</id><published>2007-02-21T02:55:00.000-08:00</published><updated>2008-01-30T07:35:51.885-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><category scheme='http://www.blogger.com/atom/ns#' term='java servlets'/><title type='text'>How To Transfer Data Via HttpConnection</title><content type='html'>You can send data from your mobile phone via Http Connection.In our thesis we will use this method.Our &lt;span style="font-weight: bold;"&gt;j2me&lt;/span&gt; interface is:&lt;span style=""&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;javax.microedition.io&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt; &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;&lt;br /&gt;        &lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;Interface  HttpConnection&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;How to open a connection?&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; private HttpConnection c = null;&lt;br /&gt;private InputStream is = null;&lt;br /&gt;private OutputStream os = null;&lt;br /&gt;private static String ="http://localhost:&lt;span style="color: rgb(51, 51, 255);"&gt;8084&lt;/span&gt;/YourWebApp/YourServlet/&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;8084:Default TomCat Port in NetBeans IDE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(51, 51, 255);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt; c = (HttpConnection)Connector.open(url);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  // Set the request method and headers&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  c.setRequestMethod(HttpConnection.POST);&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  c.setRequestProperty("User-Agent",&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;                "Profile/MIDP-2.0 Configuration/CLDC-1.0");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  c.setRequestProperty("Content-Language", "en-US");&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;  os = c.openOutputStream();&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;  os.write(msg.getBytes());&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;  os.close();&lt;br /&gt;c.close();&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;&lt;br /&gt;Add  try catch for bold area.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0); font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-7727921676200472674?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/7727921676200472674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=7727921676200472674' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/7727921676200472674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/7727921676200472674'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/02/how-to-transfer-data-via-httpconnection.html' title='How To Transfer Data Via HttpConnection'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-6368296234039822365</id><published>2007-02-18T16:18:00.001-08:00</published><updated>2008-01-30T07:36:29.493-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><title type='text'>MIDLET</title><content type='html'>In MIDP, when you develop a program actually you develop a midlet.&lt;br /&gt;&lt;blockquote&gt;Midlet :  javax.microedition.midlet.MIDLET class, which contains main application management functions, is a interface between application management software(AMS) and MIDP application.&lt;/blockquote&gt;&lt;span style="color: rgb(204, 0, 0);"&gt;Every MIDP application must extend  MIDLET class&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;As you see below our HelloPhone midlet extends from Midlet class and implements CommandListener.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;startApp()  : When program starts it call this method but it maybe recalled again and again during program.&lt;/blockquote&gt;&lt;blockquote&gt;pauseApp() : Simply pauses midlet.When user wants to continue executing program midlet invokes startApp()&lt;/blockquote&gt;&lt;blockquote&gt;destroyApp(boolean unconditional) : Ends program and release sources.If boolean unconditional set to true middlet have to release sources immediately.But if it is set to false middlet can throw "MIDletStateChangeException" to continue executing.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-6368296234039822365?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/6368296234039822365/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=6368296234039822365' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6368296234039822365'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/6368296234039822365'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/02/midlet.html' title='MIDLET'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-8676069166450155649</id><published>2007-02-18T16:16:00.001-08:00</published><updated>2007-02-19T14:27:44.728-08:00</updated><title type='text'>Example Code : Hello World!</title><content type='html'>As you guess, our first mobile program is HelloWorld which simply say HelloWorld lol&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;import&lt;/span&gt; javax.microedition.midlet.*;&lt;br /&gt;import javax.microedition.lcdui.*;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;*&lt;br /&gt;* @author  sezera.blogspot.com&lt;br /&gt;* @version 0000&lt;br /&gt;*/&lt;br /&gt;public class HelloPhone extends MIDlet implements CommandListener{&lt;br /&gt;   private Form helloForm;&lt;br /&gt;   private Command okCommand;&lt;br /&gt;   private StringItem msgStringItem;&lt;br /&gt; &lt;br /&gt;   public void startApp() {&lt;br /&gt;      getDisplay().setCurrent(get_helloForm());&lt;br /&gt;   }&lt;br /&gt;  &lt;br /&gt;   public void pauseApp() {&lt;br /&gt;   }&lt;br /&gt;  &lt;br /&gt;   public void destroyApp(boolean unconditional) {&lt;br /&gt;   }&lt;br /&gt;   public void commandAction(Command command,Displayable displayable)&lt;br /&gt;   {&lt;br /&gt;       if(displayable == helloForm){&lt;br /&gt;           if(command == okCommand){&lt;br /&gt;               //exit Midlet&lt;br /&gt;               getDisplay().setCurrent(null);&lt;br /&gt;               destroyApp(true);&lt;br /&gt;               notifyDestroyed();&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;   public Form get_helloForm()&lt;br /&gt;   {&lt;br /&gt;       if(helloForm == null){&lt;br /&gt;           helloForm = new Form(null,new Item[]{get_helloStringItem()});&lt;br /&gt;           helloForm.addCommand(get_okCommand());&lt;br /&gt;           helloForm.setCommandListener(this);&lt;br /&gt;       }&lt;br /&gt;       return helloForm;&lt;br /&gt;   }&lt;br /&gt;   public Display getDisplay()&lt;br /&gt;   {&lt;br /&gt;          return Display.getDisplay(this);&lt;br /&gt;   }&lt;br /&gt;   public StringItem get_helloStringItem() {&lt;br /&gt;       if (msgStringItem == null) {                     &lt;br /&gt;          msgStringItem = new StringItem(null,"Hello World!");                     &lt;br /&gt;       }                     &lt;br /&gt;       return msgStringItem;&lt;br /&gt;   }&lt;br /&gt;   public Command get_okCommand() {&lt;br /&gt;       if (okCommand == null) {                     &lt;br /&gt;           okCommand = new Command("Okey", Command.OK,1);                     &lt;br /&gt;       }                     &lt;br /&gt;       return okCommand;&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/32119691-8676069166450155649?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/8676069166450155649/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=8676069166450155649' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/8676069166450155649'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/8676069166450155649'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/02/example-code-hello-world.html' title='Example Code : Hello World!'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-8893649303814086173</id><published>2007-02-18T12:26:00.000-08:00</published><updated>2008-01-30T07:37:15.058-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><title type='text'>MIDP</title><content type='html'>In the previous post, there is a word called MIDP in this &lt;a href="http://java.sun.com/javame/img/javame_components.gif"&gt;figure&lt;/a&gt;.So what is MIDP?&lt;br /&gt;&lt;blockquote&gt;MIDP(Mobile Information Device Profile)    :Is a widely-common java me library for CLDC devices.&lt;/blockquote&gt;&lt;span style="font-weight: bold;"&gt;Java packages belong to MIDP 1.0&lt;/span&gt;&lt;br /&gt;  * java.io&lt;br /&gt;  * java.lang&lt;br /&gt;  * java.util&lt;br /&gt;  * javax.microedition.io&lt;br /&gt;  * javax.microedition.lcdui&lt;br /&gt;  * javax.microedition.midlet&lt;br /&gt;  * javax.microedition.rms&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Java packages belong to MIDP 2.0&lt;/span&gt;&lt;br /&gt;  * MIDP 1.0 packages&lt;br /&gt;  * javax.microedition.lcdui.game&lt;br /&gt;  * javax.microedition.media&lt;br /&gt;  * javax.microedition.media.control&lt;br /&gt;  * javax.microedition.pki&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-8893649303814086173?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/8893649303814086173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=8893649303814086173' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/8893649303814086173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/8893649303814086173'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/02/midp.html' title='MIDP'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-9154212992039946913</id><published>2007-02-18T03:49:00.000-08:00</published><updated>2008-01-30T07:37:59.239-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='j2me'/><title type='text'>J2ME</title><content type='html'>Think that you want to develop a java platform for mobile devices such as mobile phones,PDAs etc.How do you do it?You probably think simplifying J2SE and adding special attributes for mobile devices to it like Sun exactly did.&lt;a href="http://java.sun.com/javame/img/javame_components.gif"&gt;Look&lt;/a&gt; at this platform.&lt;br /&gt;&lt;br /&gt;JVM is java virtual machine as you know. KVM(first version is announced in  javaOne conference,1999)  is a JVM minimized and adopted for mobile phones and entry level PDAs as you see on image.CDC and CLDC are configurations and shows which devices will be used on this platform.&lt;br /&gt;&lt;br /&gt;       CDC  (Connected Device Configuration)         :High-end PDAs,TV set-top boxes,embedded devices&lt;br /&gt;       CLDC (Connected Limited Device Configuration) :Mobile phones and entry-level PDAs&lt;br /&gt;&lt;br /&gt;Because we will use a mobile phone(old but useful nokia 6600) our platform configuration is CLDC so i ll examine this.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Java packages belong to CLDC:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;java.io&lt;/li&gt;&lt;li&gt;java.lang&lt;/li&gt;&lt;li&gt;java.lang.ref&lt;/li&gt;&lt;li&gt;java.util&lt;/li&gt;&lt;li&gt;javax.microediton.io&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-9154212992039946913?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/9154212992039946913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=9154212992039946913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/9154212992039946913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/9154212992039946913'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/02/j2me.html' title='J2ME'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-5104872968028274963</id><published>2007-02-06T12:54:00.000-08:00</published><updated>2008-01-30T07:38:33.748-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>NetBeans IDE 5.5</title><content type='html'>I have to say that i found Java Community NetBeans IDE 5.5 amazing and we ll use this tool for doing thesis.Jakarta Tom Cat,Java Servlet,J2ME...we begin to work.Nowadays i m working on this IDE to transfer a photo image from a mobile phone to a  pc program. So i am going to write about this and leaving image processing for a while.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-5104872968028274963?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/5104872968028274963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=5104872968028274963' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/5104872968028274963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/5104872968028274963'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/02/netebeans-ide-55.html' title='NetBeans IDE 5.5'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-2518960092756851083</id><published>2007-02-06T12:50:00.000-08:00</published><updated>2008-01-30T07:39:41.824-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><title type='text'>here again</title><content type='html'>After a long time i begin to study my thesis again.Forgive me for delay:)Although nobody read this blog except me i need having some responsibility lol&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-2518960092756851083?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/2518960092756851083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=2518960092756851083' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/2518960092756851083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/2518960092756851083'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2007/02/here-again.html' title='here again'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-116704469286911149</id><published>2006-12-25T03:01:00.000-08:00</published><updated>2008-01-30T07:40:19.659-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sobel filter'/><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><title type='text'>how to find edges?</title><content type='html'>To find edges in a photo you can use a &lt;span style="color: rgb(255, 0, 0);"&gt;sobel filter. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;float [] data = {-1,-1,-1,-1,8,-1,-1,-1,-1};//Sobel filter&lt;br /&gt;Kernel kernel = new Kernel(3,3,data);&lt;br /&gt;ConvolveOp cop = new ConvolveOp(kernel);&lt;br /&gt;BufferedImage &lt;span style="color: rgb(255, 0, 0);"&gt;filteredImg&lt;/span&gt; = cop.filter(bufImg,dst);&lt;br /&gt;&lt;br /&gt;filteredImg is a black-white colored image (edges are white,others are black).To detect an object i will use edge and color informations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-116704469286911149?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/116704469286911149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=116704469286911149' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/116704469286911149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/116704469286911149'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2006/12/how-to-find-edges.html' title='how to find edges?'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-116679394144063436</id><published>2006-12-22T05:20:00.000-08:00</published><updated>2006-12-25T02:52:58.560-08:00</updated><title type='text'>how to read images in java easily?</title><content type='html'>Java Class javax.imageio.ImageIO has a static read() method so you can read images easily.&lt;br /&gt;&lt;br /&gt;try{&lt;br /&gt;File file = new File("C:\photo.jpg');&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;BufferedImage bufferedImg&lt;/span&gt; = ImageIO.read(file);&lt;br /&gt;}&lt;br /&gt;catch(IOException ioe)&lt;br /&gt;{&lt;br /&gt;System.exit(0);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;You can easily manipulate BufferedImage instances.You can call setRGB(),getRGB() methods to set or get &lt;span style="color: rgb(255, 0, 0);"&gt;Red &lt;/span&gt;&lt;span style="color: rgb(51, 204, 0);"&gt;Green&lt;/span&gt; &lt;span style="color: rgb(51, 204, 255);"&gt;Blue  &lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;parts in pixel color.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After read image to bufferedImg i need to get pixels so lets do it:&lt;br /&gt;&lt;br /&gt;               final int imwidth  = bufImg.getWidth(null);&lt;br /&gt;               final int imheight = bufImg.getHeight(null);&lt;br /&gt;&lt;br /&gt;                       for(int i=0; i &lt; imheight;i++)&lt;br /&gt;                      {&lt;br /&gt;                         for(int j=0; j&lt; imwidth;j++)&lt;br /&gt;                        {&lt;br /&gt;                           argb = getARGBs(j,i);&lt;br /&gt;                         &lt;span style="color: rgb(0, 153, 0);"&gt; //do sth with Red Green Blue parts of a pixel color.&lt;/span&gt;&lt;br /&gt;                         }&lt;br /&gt;                       }&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;//Get Alpha Red Green Blue parts of a pixel color.&lt;/span&gt;&lt;br /&gt;public int []  getARGBs(int x,int y)&lt;br /&gt;    {&lt;br /&gt;        int [] argbs = new int[4];&lt;br /&gt;        argbs[0] = (bufImg.getRGB(x,y) &gt;&gt; 24) &amp; 0xff;//alpha&lt;br /&gt;        argbs[1] = (bufImg.getRGB(x,y) &gt;&gt; 16) &amp; 0xff;//&lt;span style="color: rgb(255, 0, 0);"&gt;red&lt;/span&gt;&lt;br /&gt;        argbs[2]=(bufImg.getRGB(x,y) &gt;&gt; 8) &amp; 0xff;//&lt;span style="color: rgb(102, 255, 153);"&gt;green&lt;/span&gt;&lt;br /&gt;        argbs[3] =(bufImg.getRGB(x,y)) &amp; 0xff;//&lt;span style="color: rgb(51, 204, 255);"&gt;blue&lt;/span&gt;&lt;br /&gt;        return argbs;&lt;br /&gt;    }&lt;br /&gt;&lt;imheight;i++) int="" j="0;j&lt;imwidth;j++)" argb="getARGBs(j,i);" sth="" with="" red="" green="" blue="" parts="" of="" a="" pixel="" color=""&gt;&lt;height;i++) j="0;j&lt;width;j++)" argb="getARGBs(j,i);" sth="" with="" alpha="" red="" green="" blue="" parts="" of="" a="" pixel="" color="" public="" y="" int="" argbs="new" 4="" 0="(src.getRGB(x,y)"&gt;&lt;/height;i++)&gt;&lt;/imheight;i++)&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-116679394144063436?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/116679394144063436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=116679394144063436' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/116679394144063436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/116679394144063436'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2006/12/how-to-read-images-in-java-easily.html' title='how to read images in java easily?'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-116679061663807883</id><published>2006-12-22T04:14:00.000-08:00</published><updated>2008-01-30T07:45:38.155-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><title type='text'>first move</title><content type='html'>The MathWorks Matlab Image Processing Toolbox is really useful for processing images.You can filter images easily with different filters and see results immediately.So i choose this toolbox.&lt;br /&gt;&lt;br /&gt;The MathWorks Matlab : &lt;a href="http://www.mathworks.com/"&gt;http://www.mathworks.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After practising in matlab, i will study java image processing.My first target is processing an image in java and detect and recognize significant objects in photo.So lets go:)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-116679061663807883?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/116679061663807883/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=116679061663807883' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/116679061663807883'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/116679061663807883'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2006/12/first-move.html' title='first move'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-116678940854711885</id><published>2006-12-22T04:05:00.000-08:00</published><updated>2008-01-30T07:45:07.759-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='thesis'/><title type='text'>graduate thesis</title><content type='html'>Nowadays i really have to work on my graduate thesis project.So,i hope it will cover my blog topics until i complete it.&lt;br /&gt;&lt;strong&gt;&lt;span style="color:#3333ff;"&gt;key words&lt;/span&gt;&lt;/strong&gt;:&lt;br /&gt;image processing&lt;br /&gt;artificial intelligence&lt;br /&gt;j2me&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-116678940854711885?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/116678940854711885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=116678940854711885' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/116678940854711885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/116678940854711885'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2006/12/graduate-thesis.html' title='graduate thesis'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-115935003408154459</id><published>2006-09-27T02:31:00.000-07:00</published><updated>2008-01-30T07:44:17.743-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='artificial intelligence'/><title type='text'>First of all</title><content type='html'>First of all,we need answering the question what is really 'intelligence'?How can we say a system is a 'intelligent'?Because i like chess very much i want to give this example:&lt;br /&gt;Let's think about a  chess program which have 3 play modes:human vs human,computer vs human and computer vs computer.If computer play against us or against another computer sensibly can we call it 'intelligent'?Actually not.But if computer 'learns' some new tricks,variations from any source and develop itself on his 'own' then there stands an intelligent system.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For computer chess history look:&lt;br /&gt;&lt;a href="http://www.geocities.com/SiliconValley/Lab/7378/comphis.htm"&gt;http://www.geocities.com/SiliconValley/Lab/7378/comphis.htm&lt;/a&gt;&lt;br /&gt;One of computer chess championship:&lt;br /&gt;&lt;a href="http://www.cs.unimaas.nl/wccc2006/"&gt;http://www.cs.unimaas.nl/wccc2006/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-115935003408154459?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/115935003408154459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=115935003408154459' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/115935003408154459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/115935003408154459'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2006/09/first-of-allwe-need-answering-question.html' title='First of all'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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-32119691.post-115460685965746902</id><published>2006-08-03T05:01:00.000-07:00</published><updated>2008-01-30T07:46:05.639-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='artificial intelligence'/><title type='text'>Open your mind</title><content type='html'>Today we know that human-like machines is not a pure dream anymore.We have targets,expectations and sure great work pressure.So open your mind!Maybe one day you will have to listen your robot friend's murmur about how being such a robot is terrible.But to that day we have great difficulties.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/32119691-115460685965746902?l=sezera.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sezera.blogspot.com/feeds/115460685965746902/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=32119691&amp;postID=115460685965746902' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/115460685965746902'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/32119691/posts/default/115460685965746902'/><link rel='alternate' type='text/html' href='http://sezera.blogspot.com/2006/08/open-your-mind.html' title='Open your mind'/><author><name>Sezer Akar</name><uri>http://www.blogger.com/profile/13363784288845084152</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>
