JPA Web App Tutorial - Maven Project
The JPA Web Application tutorial provides step by step instructions on how to build a simple Java/JPA database driven web application (for Tomcat / Jetty) in Eclipse or NetBeans.
Building a new application step by step is an effective way to learn - but if you prefer, you may download and run the result application as a Maven project:
JPA Web App - Maven Project (6KB)
If Maven is installed - extract the zip and run the application from the command line by:
> mvn package jetty:run
The current directory should be guestbook-web
(containing the pom.xml
file) and port 8080 has to be available for the Jetty embedded server.
No need to download and install ObjectDB or a Java web server - Maven will download the ObjectDB jar and the Jetty embedded server automatically.
When the Jetty server is ready - open your browser at http://localhost:8080/Guestbook/
You may also open and run the Maven project in your IDE:
- JPA Web App Tutorial - Eclipse Project
- JPA Web App Tutorial - NetBeans Project
- JPA Web App Tutorial - IntelliJ Project
NetBeans IDE and IntelliJ IDEA have built in Maven support.