A struts2 CRUD sample created for a talk. You can find the slides here, too. They are partly in german.
Note: as this project uses EJB/CDI/JPA it must be run in a full-fledged application server like jboss/glassfish/TomEE/... It can not be used with a simple servlet container like Tomcat or Jetty.
- Clone this repo
- Checkout the code
- Create a datasource in your application server (Hint: have a look at the project's persistence.xml)
- Run It !
- Make it possible to add new users
- Make it possible to edit existing addresses
- Make it possible to add new addresses to users
- Make it possible to delete addresses
- Make it possible to delete users
Struts2 dynamic method invocation
- Disable DynamicMethodInvocation in struts.xml
- Make saving work again
Transaction related exercises
- Remove TransactionInterceptor from struts.xml
- Make ListUsersAction work again
- Make saving of users work again
Struts2 localization related exercises
- in edit-user.jsp the displayFormat for datepicker is hard coded. Use a format based on user's locale