FFood is a food e-commerce site that lets customers order food in a quick and convenient way.
MIT License
FFood is a food website that lets customers order food in a quick and convenient way.
FFood is a food website that lets customers order food in a quick and convenient way.
To install and set up the FFood website locally, follow these steps:
Clone the repository to your local machine:
git clone https://github.com/your-username/your-repository.git
Open the project in your preferred integrated development environment (IDE) such as NetBeans 13 and later.
Ensure you have Java SE 1.8 installed on your system.
Set up the Tomcat server:
Resolve dependencies:
pom.xml
file, however the pom.xml
file included in the source code already has the necessary dependencies.Configure the database:
DBConnection.java
file in DBConnection
package in src/main/java/
. The resulting path should be src/main/java/DBConnection/DBConnection.java
. The file should have the following content:package DBConnection;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
public class DBConnection {
private static Connection conn = null;
public static Connection getConnection() {
try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
try {
conn = DriverManager.getConnection("jdbc:sqlserver://"
+ "ENTER-YOUR-DATABASE-NAME\\SQLEXPRESS:1433;"
+ "databaseName=ffood;"
// Enter your SSMS login username
+ "user=enter-your-username;"
// Enter your SSMS login password
+ "password=enter-your-password;"
+ "encrypt=true;"
+ "trustServerCertificate= true;");
} catch (SQLException ex) {
Logger.getLogger(DBConnection.class.getName()).log(Level.SEVERE, null, ex);
}
} catch (ClassNotFoundException ex) {
Logger.getLogger(DBConnection.class.getName()).log(Level.SEVERE, null, ex);
}
return conn;
}
}
Build and deploy the project:
webapps/
.Start the Tomcat server and access the food e-commerce website:
http://localhost:8080/your-web-app-context
to access the website. The web application context path can be configured in src/main/webapp/META-INF/context.xml
""
, so the website URL should be http://localhost:8080
Now you should have FFood running locally on your machine.
This project is licensed under the MIT License.