MusicStore is an e-commerce application written in Java using Servlets and JSPs. It complies fully with the MVC design pattern, as Servlets are used as controllers and JSPs take care of the presentation (view). The problem domain (model) is described by JavaBean entities, which are mapped on tables in a MySQL relational database, using JPA provided by the EclipseLink.


The application has been deployed as a WAR to a Jetty container and you can access it by visiting


Instructions to run the web application locally.


  1. Clone the repository to your machine. git clone

  2. Run the initialize.sql script from the /db directory in order to create and populate your MySQL database with the initial data. You could for instance type:

mysql -u username -p < initialize.sql

  1. Open the /scr/conf/persistence.xml and configure the jdbc driver which will connect the application to your MySQL database. You should change the value attributes of those two xml tags.
<property name="javax.persistence.jdbc.user" value="user"/>
<property name="javax.persistence.jdbc.password" value="password"/>
  1. (Optional) Open the /src/java/com/michalgoly/util/ and edit the instance variables on top of the class, in order to enable the web application to send confirmation emails to customers after each purchase. You will also most likely have to enable less secure apps to access your gmail account for this to work here.

  2. (Optional) Open the web/WEB-INF/web.xml and uncomment the code to restrict access to the admin panel. If you are using Tomcat as your Servlet container, you will have to add the administrator role into one of your users in the $CATALINA_HOME/conf/tomcat-users.xml