Skip to content

mizbahc/Java-MVC-Website

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Java-MVC-Website

About

  • A website example using Maven web with Model View Controller structure.
  • Backend with PostgreSQL
  • Login and register functionality with CRUD operations on users.
  • ToDo task with CRUD operations on ToDo page.
  • JSP pages with bootstrap.
  • Hibernate and entity classes.

Installation

  • Use Java 1.8
  • Create or use a database to give its configuration to hibernate.cfg.xml file.
  • Create a hibernate.cfg.xml file under src/main/resources folder with correct mapping and configuration. An example hibernate.cfg.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
        "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
    <session-factory>
        <property name="connection.driver_class">org.postgresql.Driver</property>
        <property name="connection.url">jdbc:postgresql://localhost:5432/YourDatabaseUrl</property>
        <property name="connection.username">YourDatabaseUsername</property>
        <property name="connection.password">YourDatabasePassword</property>
        <property name="connection.pool_size">10</property>

        <mapping class="com.clk.model.User"/>
        <mapping class="com.clk.model.Task"/>

    </session-factory>
</hibernate-configuration>
  • Under resources folder, in hibernate.properties file change

hibernate.hbm2ddl.auto=none to hibernate.hbm2ddl.auto=create for the first usage while registering a user. After that change back to 'none'.

Screenshots

  • Home Page  
    Screenshot from 2021-09-16 22-03-35

  • Login Screen  
    Screenshot from 2021-09-16 22-03-47

  • Register Screen  
    Screenshot from 2021-09-16 22-03-56

  • User home page  
    Screenshot from 2021-09-17 22-56-48

  • User ToDo page  
    Screenshot from 2021-09-17 23-12-31

  • User ToDo page with todos  
    Screenshot from 2021-09-17 23-13-00

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages