Create A Uncomplicated Javaee6 Spider Web App Amongst Maven, Glassfish Together With Postgresql

This tutorial creates a unproblematic javaee6 projection using eclipse alongside maven. The application has one xhtml page that has a practise button, in addition to every bit you lot invitee it when press volition practise an Employee tape inwards the database. We role postgresql every bit the database in addition to glassfish every bit the container. The models are automatically created using @Entity, @Table annotation.

Important parts of the code:
1.) Eclipse-jee-juno alongside maven plugin.
  a.) Create a novel maven projection using quickstart archetype from org.apache.
  b.) You tin delete the App.java file.

The sequence tin hold upward random, exactly hither is how I add together files to the project:

2.) First nosotros add together a novel beginning folder src/main/resources in addition to add:
  a.) messages.properties for the localization
  b.) META-INF/ehcache.xml - coffee based cache
  c.) META-INF/persistence.xml - for hibernate

3.) Add novel folder src/main/webapp in addition to within it add:
  a.) index.xhtml
  b.) WEB-INF/beans.xml - to enable javaee6
  c.) WEB-INF/faces-config.xml
  d.) WEB-INFweb.xml

4.) Your coffee files should hold upward inwards src/main/java.

5.) You take away to practise connectedness puddle in addition to connectedness information source: https://ngeblognow.blogspot.com//search?q=how-to-create-connection-pool-for

6.) Download the entire code hither :-)
https://code.google.com/p/czetsuya/source/browse/#svn%2Ftrunk%2Fjavaee6-demo
Next
Previous
Click here for Comments

0 komentar:

Please comment if there are any that need to be asked.