Mentawai comes with a reference application that implements many of the framework features. You can use it to study the framework and as a starting point for your own applications. To see the reference web application in action you can click here. The source code is online here and you can also download the code from the subversion repository:
svn co http://soliveirajr.com/svn/mentatutorials/MentaRefApp/trunk MentaRefApp
By now you probably know how easy it is to create an Eclipse project from a Maven project. Just go inside the "Menta" directory and run:
mvn eclipse:eclipse -Dwtpversion=2.0
NOTE: In the latest version of Eclipse (Juno) you can choose to import "Existing Maven Projects" directly without running the command above, which might not work with Juno.
You can build with:
mvn clean install
And you can test with the Jetty plugin by running:
mvn jetty:run
Now if you go to the URL:
http://localhost:8080/menta
You will see the web application in your browser.
You can also deploy the generated menta.war file in your choice of web container.
NOTE: The reference web application uses the H2 database so there is no need to setup a database. Of course you can change it to use MySQL or any other database engine. Just make sure to create the database and configure its username and password in the appManager.properties file. The prod/appManager.properties is configured to use MySQL and you can take it as an example.
You can also check the reference application using an extra service layer. That's an alternative approach if you plan to integrate your web application with web services, ejb, desktop applications, etc., in other words, if you want to use your web application in a distributed environment.
svn co http://soliveirajr.com/svn/mentatutorials/MentaRefAppWithService/trunk MentaRefAppWithService