Skip to content

Latest commit

 

History

History
58 lines (40 loc) · 1.59 KB

README.md

File metadata and controls

58 lines (40 loc) · 1.59 KB

Java Web application

Build Status codebeat badge

Movies catalog

This is a demo application using Servlets/JSPs and JDBC. It is a small catalog of movies with the following features for guest users.

  • Filter movies by category.
  • Review the details of a given movie.

Registered users have the ability to.

  • Add more movies
  • Rate movies

Setup

You need to have both Tomcat and MySQL up and running to use this application. To setup the application you'll need to customize an application.properties file.

$ cp src/main/resources/example.properties src/main/resources/application.properties

Now you're ready to run the command line application in the class com.codeup.movies.setup.MoviesSetupApplication. It will create and seed the database.

$ mvn compile
$ java -cp "$(mvn -q exec:exec -Dexec.executable=echo -Dexec.args='%classpath')" com.codeup.movies.setup.MoviesSetupApplication

To run the application with Tomcat, create a context.xml file for Tomcat with the same database information.

$ cp src/main/webapp/META-INF/context.dist.xml src/main/webapp/META-INF/context.xml

Tests

The tests use a different MySQL database, so you'll need a different properties file.

$ cp src/test/resources/example.properties src/test/resources/tests.properties

To run the tests execute.

$ mvn test