Here is my Sample Struts, Hibernate CRUD application. This can act as starting point for those who are starting to build applications on hibernate and struts. I know struts 1 is sort of out dated, but i still think there are lot of legacy applications running on Struts 1.
This application has the following features.
- Basic Create, Update and Delete Operations
- Security (Login Support)
- Validation (Struts Validations)
- Internationalization and Localization (Look at the Links on the top of page, you can change the language of the application).
- Ant build script to build and deploy the application.
Download the source code leadapp.zip (5.66 Mb)
Building and deploying the application
- Create a schema/user using the schema.sql file in src/database
- Open build.properties and modify "tomcat.home" property to point your tomcat home directory
- Database username/password can be configured in the hibernate config file \WebRoot\WEB-INF\hibernate.cfg.xml
- Issue "ant clean deploy" command to build and deploy the application to tomcat.
- Access the application http://localhost:8080/leadapp (assuming tomcat is running on 8080 port)
- username/password is firstname.lastname@example.org/javachap
I hosted this application on stax.net, access it from here http://hw4999.dvkvarma.staxapps.net, please write in the comments section if you have any problems running the application.
Recommended ReadingNo Google Reader feed was found with the provided ID. Please validate the ID in plug-in configuration.
- How to Alias a Host Name on Mac OS X
- How I Fixed Battery Life On my Mac Book Pro with Retina Display
- Space shuttle Endeavour’s trip through the streets of LA
- Script to Backup MySQL and CVS to Amazon S3
- 6th Grader and iPhone Application Developer