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

<channel>
	<title>J2EE architectures</title>
	<atom:link href="http://molteni.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://molteni.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Mon, 27 Apr 2009 10:27:08 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='molteni.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/8d13c0e989e315a9cc6ccaeee66230fa?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>J2EE architectures</title>
		<link>http://molteni.wordpress.com</link>
	</image>
			<item>
		<title>Tutorial: use Java to develop Facebook applications</title>
		<link>http://molteni.wordpress.com/2009/04/27/tutorial-use-java-to-develop-facebook-applications-example/</link>
		<comments>http://molteni.wordpress.com/2009/04/27/tutorial-use-java-to-develop-facebook-applications-example/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 10:27:08 +0000</pubDate>
		<dc:creator>molteni</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://molteni.wordpress.com/?p=73</guid>
		<description><![CDATA[Create a FB application is funny and easy with Java. There are some open source libraries that can help you to achieve your goal. You find these libraires here :
http://wiki.developers.facebook.com/index.php/Java
I used the facebook-java-api to create this tutorial. It’s a good library but unfortunately it miss documentation (in the traditional OSS old style   )
http://code.google.com/p/facebook-java-api/
I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=73&subd=molteni&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Create a FB application is funny and easy with Java. There are some open source libraries that can help you to achieve your goal. You find these libraires here :<br />
<a href="http://wiki.developers.facebook.com/index.php/Java">http://wiki.developers.facebook.com/index.php/Java</a><br />
I used the facebook-java-api to create this tutorial. It’s a good library but unfortunately it miss documentation (in the traditional OSS old style <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  )<br />
<a href="http://code.google.com/p/facebook-java-api/">http://code.google.com/p/facebook-java-api/</a><br />
I used SpringMVC as framework, it’s very easy to pass values to web pages with Spring.<br />
I created 2 pages , one for the login (index.htm) and a second page (results.htm) that shows the results :<br />
Code of the first page :</p>
<pre class="brush: java;">
IFacebookRestClient fbClient = new FacebookJsonRestClient(API_KEY, SECRET_CODE)

FacebookWebappHelper fh = new FacebookWebappHelper(request, response, API_KEY, SECRET_CODE, fbClient);
        fh.requireLogin(&quot;&quot;);

        if (!fh.isLogin())
            return null;
</pre>
<p>The goal of this page is to login the user if is still not logged in. Is in your application configuration on Facebook that you can decide where to send the user after the succesful login.</p>
<p>The second page contains this code :</p>
<pre class="brush: java;">
protected ModelAndView handleRequestInternal(
            HttpServletRequest request,
            HttpServletResponse response) throws Exception {
  String token = ServletRequestUtils.getStringParameter(request, &quot;auth_token&quot;);
  IFacebookRestClient fbClient = new FacebookJsonRestClient(API_KEY, SECRET_CODE);
  fbClient.auth_getSession(token);

  // get your Facebook id
  Long id = fbClient.users_getLoggedInUser();

  // query Facebook database, ask for all friends single and give me their uid and their complete name
  JSONArray sqlResult = (JSONArray) fbClient.fql_query(&quot;SELECT uid, name FROM user WHERE  relationship_status='single' AND uid IN (SELECT uid2 FROM friend WHERE uid1 = &quot; + id.toString() + &quot;)&quot;);

  // write the result in a List
List users = new ArrayList();
        for (int i = 0; i &lt; sqlResults.length(); i++) {
            User usr = new User();
            usr.setUid(Long.valueOf(sqlResults.getJSONObject(i).getString(&quot;uid&quot;)));
            usr.setName(sqlResults.getJSONObject(i).getString(&quot;name&quot;));
            users.add(usr);
        }

// send the result to the webpage
ModelAndView mav = new ModelAndView();
mav.addObject(&quot;users&quot;, users);
return mav;
}
}
</pre>
<p>This code fragment return the list of my friends single and I put this friends in an ArrayList of User (class included in facebook-java-api).<br />
Show the results in a jsp page is very easy :</p>
<pre class="brush: xml;">
&lt;table border=&quot;1&quot;&gt;
              &lt;tr&gt;&lt;td&gt;First name&lt;/td&gt;&lt;td&gt;Name&lt;/td&gt;&lt;/tr&gt;
              &lt;tr&gt;&lt;td&gt;${user.uid}&lt;/td&gt; &lt;td&gt;${user.name}&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/molteni.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/molteni.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/molteni.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/molteni.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/molteni.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/molteni.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/molteni.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/molteni.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/molteni.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/molteni.wordpress.com/73/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=73&subd=molteni&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://molteni.wordpress.com/2009/04/27/tutorial-use-java-to-develop-facebook-applications-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e899bd90e87966872ba067033d4de4a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">molteni</media:title>
		</media:content>
	</item>
		<item>
		<title>Use Groovy has Spring bean in a JSF web application</title>
		<link>http://molteni.wordpress.com/2009/04/01/use-groovy-in-a-spring-jsf-web-application/</link>
		<comments>http://molteni.wordpress.com/2009/04/01/use-groovy-in-a-spring-jsf-web-application/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 07:25:43 +0000</pubDate>
		<dc:creator>molteni</dc:creator>
				<category><![CDATA[Groovy]]></category>
		<category><![CDATA[JSF]]></category>
		<category><![CDATA[Javaserver Faces]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://molteni.wordpress.com/?p=55</guid>
		<description><![CDATA[It&#8217;s easy and powerful use Groovy classes in your Java web application using the Spring Framework. Here you can find a tutorial.
In my last project I had to scan a complex xml file and copy the information to a database. A Java class (using org.wc3.dom.* and DocumentBuilder) did the work but the hundreds lines of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=55&subd=molteni&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>It&#8217;s easy and powerful use Groovy classes in your Java web application using the Spring Framework. Here you can find a tutorial.</p>
<p>In my last project I had to scan a complex xml file and copy the information to a database. A Java class (using org.wc3.dom.* and DocumentBuilder) did the work but the hundreds lines of code were complex and not easy to maintain.</p>
<p>Ex.</p>
<pre class="brush: java;">
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder        docBuilder        = docBuilderFactory.newDocumentBuilder();
doc = docBuilder.parse(fileName);
doc.getDocumentElement().normalize();
NodeList listOfEntries = doc.getElementsByTagName(&quot;entry&quot;);
for (int s = 0; s &lt; listOfEntries.getLength(); s++) {
  Node firstEntityNode = listOfEntries.item(s);
  if (firstEntityNode.getNodeType() == Node.ELEMENT_NODE) {
  ListEntry entry              = new ListEntry();
  Element   firstEntityElement = (Element) firstEntityNode;
  NodeList  uidList            = firstEntityElement.getElementsByTagName(&quot;uid&quot;);
  ...
</pre>
<p>For this reason I decided to integrate groovy in the Spring-JSF application, Groovy has the XMLSlurper class that allows to easily access an XML file like if it is a collection of classes.</p>
<p>You can see <a href="http://www.theregister.co.uk/2008/01/11/groovy_xml_part_two/" target="_blank">here</a> a tutorial for SMLSlurper.</p>
<p>In my application the role of the first Groovy class were the following:</p>
<ul>
<li>accept 2 parameters from a traditional java class (xml file address and an integer parameter)</li>
<li>process the xml file</li>
<li>use 2 existing Java classes</li>
<li>return an ArrayList of custom objects with the values found in the list</li>
</ul>
<p><strong>Tasks:</strong></p>
<p><strong>1. add the groovy jar to the libraries of your application</strong></p>
<p><strong>2. create a traditional Java Interface</strong></p>
<pre class="brush: java;">
package ch.genidea.checknames.importer;
import java.util.List;

import ch.genidea.checknames.model.ListEntry;
import ch.genidea.checknames.model.SourceList;

public interface Parser {
    List parse();
    void setFilename(String filename);
    void setSourceList(SourceList sourceList);
}
</pre>
<p>I had to declare the setters for the 2 variables to import in the groovy class.</p>
<p><strong>3. create the groovy class in the classpath</strong>. If you are using maven add it to the src/main/resources directory.</p>
<p>Ex.</p>
<pre class="brush: java;">
package ch.genidea.checknames.importer

import java.util.List;
import ch.genidea.checknames.model.ListEntry;
import ch.genidea.checknames.model.SourceList;

public class ParserImpl implements ch.genidea.checknames.importer.Parser{
    String filename
    List &lt;ListEntry&gt; result
    SourceList sourceList

    public List&lt;ListEntry&gt; parse(){
        def pers=new XmlSlurper().parse(new File(filename))

        List &lt;ListEntry&gt; result = new ArrayList&lt;ListEntry&gt;()
        def allEntry = pers.Entry

        allEntry.each{
                 result.add(addEntry(it))
                 it.akaList.aka.each{
                 result.add(addEntry(it))
                 }
        }
        return result
    }
    ListEntry addEntry(def it)
    {
            ListEntry entity = new ListEntry()
             entity.uid = (it.uid.text() as Integer)
             entity.sourceList=sourceList
             entity.familyName = it.lastName.text()
             entity.firstName = it.firstName.text()
             return entity
    }

    void setFilename(String filename)
    {
        this.filename = filename
    }
    void setSourceList(SourceList sourceList)
    {
        this.sourceList = sourceList
    }

}
</pre>
<p>In few lines the class did the same work of hundreds of lines of code of the previous implementation <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>In this groovy class we use ListEntry and SourceList that are traditional java classes and we return a List&lt;ListEntry&gt; object</p>
<p><strong>4. Declare the bean in Spring</strong></p>
<pre class="brush: xml;">

&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
xmlns:lang=&quot;http://www.springframework.org/schema/lang&quot;
 ...
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-2.5.xsd&quot;
...
&gt;
&lt;lang:groovy id=&quot;parser&quot; script-source=&quot;classpath:ch/genidea/checknames/importer/ParserImpl.groovy&quot; /&gt;

&lt;bean name = &quot;listImportService&quot; class=&quot;ch.genidea.checknames.lists.service.ListImportServiceImpl&quot;&gt;
&lt;property name=&quot;parser&quot; ref=&quot;parser&quot;&gt;&lt;/property&gt;
&lt;/bean&gt;

 </pre>
<p><strong>5. use the groovy class in your sourcecode <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong></p>
<pre class="brush: java;">
parser.setFilename(fileSource);
parser.setSourceList(sl);
List&lt;ListEntry&gt; list = parser.parse();
</pre>
<p>The only drawbacks I had are:</pre>
<ul>
<li>with Eclipse is not easy to debug groovy, but I used the groovyconsole to test rapidly the changes</li>
<li>4MB added using the groovy-all.jar</li>
</ul>
<p>Small issues compared to the great benefits of having less and more readable codeeasy a</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/molteni.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/molteni.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/molteni.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/molteni.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/molteni.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/molteni.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/molteni.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/molteni.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/molteni.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/molteni.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=55&subd=molteni&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://molteni.wordpress.com/2009/04/01/use-groovy-in-a-spring-jsf-web-application/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e899bd90e87966872ba067033d4de4a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">molteni</media:title>
		</media:content>
	</item>
		<item>
		<title>Test your webservices</title>
		<link>http://molteni.wordpress.com/2009/03/31/test-your-webservices/</link>
		<comments>http://molteni.wordpress.com/2009/03/31/test-your-webservices/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 22:49:20 +0000</pubDate>
		<dc:creator>molteni</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://molteni.wordpress.com/?p=53</guid>
		<description><![CDATA[During my last project I had to test the answer of some webservices (SOAP) of the application. I found SoapUI that allows to send request easily and fast. The tool is free but there is a more complete commercial version.
No need to create extra code to test the results  
     [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=53&subd=molteni&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>During my last project I had to test the answer of some webservices (SOAP) of the application. I found <a href="http://www.soapui.org/">SoapUI</a> that allows to send request easily and fast. The tool is free but there is a more complete commercial version.</p>
<p>No need to create extra code to test the results <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/molteni.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/molteni.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/molteni.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/molteni.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/molteni.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/molteni.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/molteni.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/molteni.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/molteni.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/molteni.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=53&subd=molteni&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://molteni.wordpress.com/2009/03/31/test-your-webservices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e899bd90e87966872ba067033d4de4a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">molteni</media:title>
		</media:content>
	</item>
		<item>
		<title>JSF and Spring Security (Acegi) using facelets</title>
		<link>http://molteni.wordpress.com/2009/03/26/jsf-and-spring-security-acegi-using-facelets/</link>
		<comments>http://molteni.wordpress.com/2009/03/26/jsf-and-spring-security-acegi-using-facelets/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 12:18:17 +0000</pubDate>
		<dc:creator>molteni</dc:creator>
				<category><![CDATA[JSF]]></category>
		<category><![CDATA[Javaserver Faces]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://molteni.wordpress.com/?p=49</guid>
		<description><![CDATA[Two tips for the people who is fighting with these technologies:
1. Implement the login page: here you have a great tutorial that explains how to implement a login page in JSF using Spring Security in only few lines of code. 
2. Somebody is implementing the tags for jsf. You can try his library : BodyGuard
 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=49&subd=molteni&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Two tips for the people who is fighting with these technologies:</p>
<p>1. Implement the login page: <a href="http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/">here</a> you have a great tutorial that explains how to implement a login page in JSF using Spring Security in only few lines of code. </p>
<p>2. Somebody is implementing the tags for jsf. You can try his library : <a href="http://faces.eti.br/2008/11/09/bodyguard-facelets-el-functions-for-spring-security/">BodyGuard</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/molteni.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/molteni.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/molteni.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/molteni.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/molteni.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/molteni.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/molteni.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/molteni.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/molteni.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/molteni.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=49&subd=molteni&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://molteni.wordpress.com/2009/03/26/jsf-and-spring-security-acegi-using-facelets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e899bd90e87966872ba067033d4de4a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">molteni</media:title>
		</media:content>
	</item>
		<item>
		<title>Spring MVC 3.0</title>
		<link>http://molteni.wordpress.com/2009/03/11/spring-mvc-30/</link>
		<comments>http://molteni.wordpress.com/2009/03/11/spring-mvc-30/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 08:37:22 +0000</pubDate>
		<dc:creator>molteni</dc:creator>
				<category><![CDATA[JSF]]></category>
		<category><![CDATA[Spring]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://molteni.wordpress.com/?p=42</guid>
		<description><![CDATA[I found two interesting presentations of Spring MVC 3 (part of Spring Framework, still in RC phase)
Slides
 and a second presentation in pdf

The big improvement is the full support of REST and logical URI parameters. Spring EL is now available and there is no more dependency with other EL libraries (JBoss and OSGI).
   [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=42&subd=molteni&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I found two interesting presentations of Spring MVC 3 (part of Spring Framework, still in RC phase)<br />
<a href="http://www.slideshare.net/kensipe/spring-mvc-code-mash09-presentation">Slides</a><br />
 and a second presentation in <a href="www.devnexus.com/presentations/WhatsNewInSpring3.pdf">pdf</a><br />
<br />
The big improvement is the full support of REST and logical URI parameters. Spring EL is now available and there is no more dependency with other EL libraries (JBoss and OSGI).</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/molteni.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/molteni.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/molteni.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/molteni.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/molteni.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/molteni.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/molteni.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/molteni.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/molteni.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/molteni.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=42&subd=molteni&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://molteni.wordpress.com/2009/03/11/spring-mvc-30/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e899bd90e87966872ba067033d4de4a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">molteni</media:title>
		</media:content>
	</item>
		<item>
		<title>JPA: lazy loading for lazy developers, the performance issue</title>
		<link>http://molteni.wordpress.com/2009/03/09/jpa-performance-inser/</link>
		<comments>http://molteni.wordpress.com/2009/03/09/jpa-performance-inser/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 16:17:01 +0000</pubDate>
		<dc:creator>molteni</dc:creator>
				<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://molteni.wordpress.com/?p=38</guid>
		<description><![CDATA[I found and interesting article about loading and reading data with JPA. There are performance issues when you want to insert 1&#8242;000 or 10&#8242;000 records in the database.
Before ORM life was complicated &#8230; 25 lines of code to insert a line in the database, not it&#8217;s easier: entityManager.persist(object)!
The frameworks (Hibernate, Toplink &#8230;) do all the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=38&subd=molteni&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I found and <a href="http://terrazadearavaca.blogspot.com/2008/12/jpa-implementations-comparison.html">interesting article</a> about loading and reading data with JPA. There are performance issues when you want to insert 1&#8242;000 or 10&#8242;000 records in the database.<br />
Before ORM life was complicated &#8230; 25 lines of code to insert a line in the database, not it&#8217;s easier: entityManager.persist(object)!<br />
The frameworks (Hibernate, Toplink &#8230;) do all the work and they do very well the work. The problem with JPA is that we cannot flush the session like in hibernate and send 50 or 100 records in a block to the DB. JPA send and retrieve each object in a transaction. Inserting 10&#8242;000 records takes minutes &#8230; 1&#8242;000&#8242;000 hours.<br />
The solution is to use direcly JDBC, ETL product or frameworks (Spring Batch, &#8230;).<br />
JPA is something great but it cannot manage everything <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  no party for the lazy developers &#8230; yet!</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/molteni.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/molteni.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/molteni.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/molteni.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/molteni.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/molteni.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/molteni.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/molteni.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/molteni.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/molteni.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=38&subd=molteni&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://molteni.wordpress.com/2009/03/09/jpa-performance-inser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e899bd90e87966872ba067033d4de4a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">molteni</media:title>
		</media:content>
	</item>
		<item>
		<title>Give to your client a dedicated J2EE server in ASP mode</title>
		<link>http://molteni.wordpress.com/2009/03/09/give-to-your-client-a-dedicated-j2ee-server-in-asp-mode/</link>
		<comments>http://molteni.wordpress.com/2009/03/09/give-to-your-client-a-dedicated-j2ee-server-in-asp-mode/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 14:58:54 +0000</pubDate>
		<dc:creator>molteni</dc:creator>
				<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://molteni.wordpress.com/?p=33</guid>
		<description><![CDATA[In my last project we had to sell ASP solutions to client. The software works on our servers and the clients have to connect remotely.
The projet has been launced by a small non-IT company, mantain a Server Park for them is not possible. For this reason we opted for dedicated server managed by exernal service [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=33&subd=molteni&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In my last project we had to sell ASP solutions to client. The software works on our servers and the clients have to connect remotely.<br />
The projet has been launced by a small non-IT company, mantain a Server Park for them is not possible. For this reason we opted for dedicated server managed by exernal service provider.</p>
<p>The problem of this solution is that one server is very expensive and the approach to create multiple instances of Tomcat, mysql, &#8230; is a big risk in case of problem of one instance and it&#8217;s complicated in the configuration phase.</p>
<p>The solution adopted is to install VMWare Server (you can do the same with Virtuozzo, XEN, &#8230;) and install an Ubuntu VM for each client. Ubuntu has a server edition conceived for the VMs (<a href="http://www.ubuntu.com/products/whatisubuntu/serveredition/jeos">Ubuntu JEOS</a>). It needs only 128MB ram and 200 MB HD. We used Tomcat 6 (thanks Spring!!!) for this product (max 200MB for instance). 512 MB dedicated for each VM is largely sufficient.</p>
<p>Each client has a different ip port to connect to the appication. Configuring the nat.conf of VMWare on the server we can easily redirect the client request to his &#8216;dedicated server&#8217;. On a typical server with 4GB of ram we can install 8 VMs reducing the costs for us and the client.</p>
<p>A big advantage is the possibility to create locally the VM and transfer it to the &#8216;production&#8217; when it&#8217;s ready copying the files. The maintenance is easier because when we have to upgrade the version we can redirect the port to a different VM with the updated product. This last options is not implemented yet because we preferred to maintain the DB server in the VM with tomcat. In the future (after benchmarks) it could be interesting to install a &#8217;service&#8217; VM with the DB and access it directly from the VMs.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/molteni.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/molteni.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/molteni.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/molteni.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/molteni.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/molteni.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/molteni.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/molteni.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/molteni.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/molteni.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=33&subd=molteni&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://molteni.wordpress.com/2009/03/09/give-to-your-client-a-dedicated-j2ee-server-in-asp-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e899bd90e87966872ba067033d4de4a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">molteni</media:title>
		</media:content>
	</item>
		<item>
		<title>Spring &#8211; Configuration file</title>
		<link>http://molteni.wordpress.com/2009/03/07/spring-configuration-file/</link>
		<comments>http://molteni.wordpress.com/2009/03/07/spring-configuration-file/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 12:16:38 +0000</pubDate>
		<dc:creator>molteni</dc:creator>
				<category><![CDATA[Spring]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://molteni.wordpress.com/?p=24</guid>
		<description><![CDATA[Problem
Spring is managing the database connection of my application. I want to extract the parameters outside my applicationContext.xml file

 &#60;bean id=&#34;dataSource&#34; class=&#34;org.springframework.jdbc.datasource.DriverManagerDataSource&#34;&#62;
&#60;property name=&#34;driverClassName&#34; value=&#34;com.mysql.jdbc.Driver&#34; /&#62;
&#60;property name=&#34;url&#34; value=&#34;jdbc:mysql://localhost/database&#34; /&#62;
&#60;property name=&#34;username&#34; value=&#34;user&#34;/&#62;
&#60;property name=&#34;password&#34; value=&#34;password&#34;/&#62;
  &#60;/bean&#62;

Solution
Add the PropertyPlaceholderConfigurer bean to your ApplicationContext with the name of the file(s) containing the data.

&#60;bean id=&#34;propertyConfigurer&#34; class=&#34;org.springframework.beans.factory.config.PropertyPlaceholderConfigurer&#34;&#62;
&#60;property name=&#34;location&#34;&#62;
    [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=24&subd=molteni&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><strong>Problem</strong><br />
Spring is managing the database connection of my application. I want to extract the parameters outside my applicationContext.xml file</p>
<pre class="brush: xml;">
 &lt;bean id=&quot;dataSource&quot; class=&quot;org.springframework.jdbc.datasource.DriverManagerDataSource&quot;&gt;
&lt;property name=&quot;driverClassName&quot; value=&quot;com.mysql.jdbc.Driver&quot; /&gt;
&lt;property name=&quot;url&quot; value=&quot;jdbc:mysql://localhost/database&quot; /&gt;
&lt;property name=&quot;username&quot; value=&quot;user&quot;/&gt;
&lt;property name=&quot;password&quot; value=&quot;password&quot;/&gt;
  &lt;/bean&gt;
</pre>
<p><strong>Solution</strong><br />
Add the PropertyPlaceholderConfigurer bean to your ApplicationContext with the name of the file(s) containing the data.</p>
<pre class="brush: xml;">
&lt;bean id=&quot;propertyConfigurer&quot; class=&quot;org.springframework.beans.factory.config.PropertyPlaceholderConfigurer&quot;&gt;
&lt;property name=&quot;location&quot;&gt;
        &lt;value&gt;WEB-INF/data.properties&lt;/value&gt;
    &lt;/property&gt;
&lt;/bean&gt;
</pre>
<p>If you have more property files you can use the &lt;list&gt; tag:</p>
<pre class="brush: xml;">
&lt;property name=&quot;locations&quot;&gt;
	&lt;list&gt;
&lt;value&gt;data.properties&lt;/value&gt;
&lt;value&gt;...&lt;/value&gt;
&lt;/list&gt;
&lt;/property&gt;
</pre>
<p>The data.properties should be like this:</p>
<pre class="brush: java;">
database.url= jdbc:mysql://localhost/CheckNames
database.username=username
database.password=password
</pre>
<p>To use these properties in your applicationContext.xml file:</p>
<pre class="brush: xml;">
&lt;bean id=&quot;dataSource&quot; class=&quot;org.springframework.jdbc.datasource.DriverManagerDataSource&quot;&gt;
&lt;property name=&quot;driverClassName&quot; value=&quot;com.mysql.jdbc.Driver&quot; /&gt;
&lt;property name=&quot;url&quot;&gt;&lt;value&gt;${database.url}&lt;/value&gt;&lt;/property&gt;
&lt;property name=&quot;username&quot;&gt;&lt;value&gt;${database.username}&lt;/value&gt;&lt;/property&gt;
&lt;property name=&quot;password&quot;&gt; &lt;value&gt;${database.password}&lt;/value&gt;&lt;/property&gt;
  &lt;/bean&gt;
</pre>
<p><a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/beans/factory/config/PropertyPlaceholderConfigurer.html">Spring reference</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/molteni.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/molteni.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/molteni.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/molteni.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/molteni.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/molteni.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/molteni.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/molteni.wordpress.com/24/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/molteni.wordpress.com/24/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/molteni.wordpress.com/24/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=24&subd=molteni&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://molteni.wordpress.com/2009/03/07/spring-configuration-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e899bd90e87966872ba067033d4de4a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">molteni</media:title>
		</media:content>
	</item>
		<item>
		<title>Spring: split the application context</title>
		<link>http://molteni.wordpress.com/2009/03/06/spring-split-the-application-context/</link>
		<comments>http://molteni.wordpress.com/2009/03/06/spring-split-the-application-context/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 08:49:19 +0000</pubDate>
		<dc:creator>molteni</dc:creator>
				<category><![CDATA[Spring]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://molteni.wordpress.com/?p=18</guid>
		<description><![CDATA[There are many reasons to declare the beans in more than one xml file. The most important reason is to maintain the code clear with a logical separation of the content of the file. The second reason is that when the application begin big only one file is not enough for the configuration.
In Spring is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=18&subd=molteni&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>There are many reasons to declare the beans in more than one xml file. The most important reason is to maintain the code clear with a logical separation of the content of the file. The second reason is that when the application begin big only one file is not enough for the configuration.</p>
<p>In Spring is easy to split the content of the applicationContext.xml:<br />
<strong>web.xml</strong><br />
You have to declare the <strong>contextConfigLocation<br />
<code><br />
&lt;context-param&gt;&lt;param-name&gt;<br />
contextConfigLocation<br />
&lt;param-value&gt;<br />
/WEB-INF/yourApplicationServices.xml, /WEB-INF/yourApplicationDatabase<br />
&lt;/param-value&gt;&lt;/context-param&gt;<br />
</code><br />
<span style="font-weight:normal;">You can use Ant-style pattern to call your files e.g. /WEB-INF/yourApplication*.xml</span></strong></p>
<p><a href="http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/web/context/ContextLoader.html">Spring reference</a></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/molteni.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/molteni.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/molteni.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/molteni.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/molteni.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/molteni.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/molteni.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/molteni.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/molteni.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/molteni.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=18&subd=molteni&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://molteni.wordpress.com/2009/03/06/spring-split-the-application-context/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e899bd90e87966872ba067033d4de4a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">molteni</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Spring with JSF &#8211; the managed bean &#8211; tutorial</title>
		<link>http://molteni.wordpress.com/2009/03/06/spring-jsf-tutorial/</link>
		<comments>http://molteni.wordpress.com/2009/03/06/spring-jsf-tutorial/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 00:06:49 +0000</pubDate>
		<dc:creator>molteni</dc:creator>
				<category><![CDATA[JSF]]></category>
		<category><![CDATA[Spring]]></category>

		<guid isPermaLink="false">http://molteni.wordpress.com/?p=5</guid>
		<description><![CDATA[Two J2EE technologies are becoming dominant in the Java environment: Spring and Java ServerFaces.
Spring beans could be easily integrated in a JSF project. Spring Beans can coexists with JSF managed beans or interact directly with the view.
The steps necessary to use Spring in a JSF projects are the following:
Libraries
Spring libraries must be accessible  
web.xml
In [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=5&subd=molteni&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Two J2EE technologies are becoming dominant in the Java environment: Spring and Java ServerFaces.<br />
Spring beans could be easily integrated in a JSF project. Spring Beans can coexists with JSF managed beans or interact directly with the view.</p>
<p>The steps necessary to use Spring in a JSF projects are the following:</p>
<p><strong>Libraries</strong><br />
Spring libraries must be accessible <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>web.xml</strong><br />
In web.xml you have to declare your spring listener:</p>
<pre class="brush: xml;">
&lt;listener&gt;
&lt;listener-class&gt;
    org.springframework.web.context.ContextLoaderListener
  &lt;/listener-class&gt;
&lt;/listener&gt;
</pre>
<p>To use the request values between the view (jsp/jsf) ad the bean you have to add a second listener:</p>
<pre class="brush: xml;">
&lt;listener&gt;
&lt;listener-class&gt;
org.springframework.web.context.request.RequestContextListener
&lt;/listener-class&gt;
&lt;/listener&gt;
</pre>
<p><strong>faces-config.xml</strong><br />
In faces-config.xml usually you define the managed beans. To use spring beans you have to add the following lines:</p>
<pre class="brush: xml;">
&lt;application&gt;
&lt;variable-resolver&gt;
org.springframework.web.jsf.DelegatingVariableResolver
&lt;/variable-resolver&gt;&lt;code&gt;
&lt;/application&gt;
</pre>
<p><strong>applicationContext.xml</strong><br />
In the applicationContext.xml you have to declare your beans like a standard Spring application, the only difference is the property scope:</p>
<pre class="brush: xml;">
&lt;bean name =&quot;personMB&quot; class=&quot;ch.genidea.ofac.web.jsf.Person&quot; &lt;strong&gt;scope=&quot;request&quot;&lt;/strong&gt;&gt;
&lt;property name= ... /&gt;
&lt;/bean&gt;
</pre>
<p>Usually the <strong>scope</strong> property is set as <em>singleton</em> (default). For the web application you have 3 possibilities:</p>
<ul>
<li>request: Scopes a single bean definition to the lifecycle of 							a single HTTP request; that is each and every HTTP request will 							have its own instance of a bean created off the back of a 							single bean definition.</li>
<li>session: Scopes a single bean definition to the lifecycle of 							a HTTP <tt class="interfacename">Session</tt>.</li>
<li>global session: Scopes a single bean definition to the lifecycle of a 							global HTTP <tt class="interfacename">Session</tt>. Typically 							only valid when used in a portlet context.</li>
</ul>
<p><strong>page.jsp</strong></p>
<p>In your page you can call the bean directly :</p>
<pre class="brush: xml;">
&lt;h:outputText value=&quot;First name&quot;/&gt; &lt;h:inputText value=&quot;#{personMB.firstName}&quot; id=&quot;personName&quot;/&gt;
&lt;h:outputText value=&quot;Family name&quot;/&gt; &lt;h:inputText value=&quot;#{personMB.lastName}&quot; id=&quot;personFamilyName&quot;/&gt;
</pre>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/molteni.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/molteni.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/molteni.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/molteni.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/molteni.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/molteni.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/molteni.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/molteni.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/molteni.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/molteni.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=molteni.wordpress.com&blog=1290306&post=5&subd=molteni&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://molteni.wordpress.com/2009/03/06/spring-jsf-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4e899bd90e87966872ba067033d4de4a?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">molteni</media:title>
		</media:content>
	</item>
	</channel>
</rss>