Example of MVC EE (J2EE) application of a bookshop using Java back-end and React.js as front-end.
- Install jdk 17 or above
- Install Tomcat 8
- Install Maven 3.8.1 or above
- Install Derby 10.15.2.0
- Create bookshop database
- Run Database
- Build web-application
- Deploy and run web-application
Run ij Derby tool in the folder where you want to create the database , copy here *.sql files from project root and launch this command :
CONNECT 'jdbc:derby:bookshop;create=true';
run 'bookshop.sql';
run 'insert_bookshop.sql';
commit;
exit
In the folder where is created the database launch this command:
.\bin\startNetworkServer.bat
Run the following command :
mvn clean compile war:war
Deploying the artifact bookshop.war in Tomcat 8 server and run it, test the application with this link.
http://localhost:8080/bookshop/index.html
You could see the following pages:
- Install npm
Use react-js folder to play with react , after launch the build:
cd react-js
npm run build
When updated deploy the project web-application again on the server.