Hi, this is the second post of a series where i’ll be publishing some samples showing how to develop web applications with Java technology.
This post sample consists on a project ‘staffgest-jsf‘ that serves as presentation layer using JSF.
The proposed flow on the web application is:
- Visit – ‘localhost:8080/staffgest-mvc-jsp/new-employee.xhtml’ , where a form to create an employee is showed
– submit form and “new-employee-result.xhtml” is rendered
- Visit – ‘localhost:8080/staffgest-mvc-jsp/search-employee.xhtml’ , where a form to search an employee is showed
– submit form and “search-employee-result.xhtml” is rendered
Relevant code snippets:
JSF configuration on web.xml
Employee Backing Bean
‘staffgest-mdw‘ , ‘staffgest-jsf‘ – are all maven projects, so it should be fairly simple to import and build it. First build “staffgest-mdw” and the run “staffgest-jsf” through a main class ‘App.java’.
Hope it’s helpful for someone!