How to create a FACEBOOK Sign Up using RESTFUL API

Facebook signup using Java Restful API Even though Facebook was created using PHP, I just tried to simulate the face book sign up page using Java Restful API code, this would be useful for the students to create their final year project using JAVA RESTFUL API.

If you are final year Graduate then you can very well develop the project using following code and it would help you to get internship at the Big IT Companies.

My Casual Class Room Video

Here I have explained visually the code and the Project structure that we need to have if we are building the RESTFUL API Project using JAVA.


DOWN LOAD  Facebook Sign up CODE Using Java Restful API:

Download this code into your eclipse workspace provided you need to install eclipse and Tomcat server.
Download all the related Jars that we need to execute this.


Java Restful API Code for FACEBOOK SIGN UP Page.

1. Rest Controller:

Always we need to have the Controller in MVC projects which will be controlling all other actions.

Step 1 . Create com.SellBuy.MainController and then create a class called  MainController.Java

Step 2: Once Controller has been created then we need to have ACTION classes that would carry out what is being passed from controller.

Create a package com.SellBuy.Action and then create a UserLogin.java class.

Inside this class we will be validating Facebook sing up Login.


2. Model Classes:

Create a package something like this com.SellBuy.Model.DTO and then create following 2 classes inside this package.

1. Create User.java class with the following code with getter and setter code.

2. Create UserRegistration.java in this package com.SellBuy.Model.DTO


3.Database Base Connection  (DAO)

Create package called com.SellBuy.DAO and then create java class called DBConnection as mentioned below.


4.RESTFUL WEBSERVICE CODE

Create the package com.SellBuy.DAO.DBConnection and then create Face book Restful java class called UserLogin.java.

Create a package called com.SellBuy.Model.DTO.User and then create class called UserService.java.


5.web.xml


6. How to Create Face Book UI Pages using Jsp?

Once after creating all the Java classes, we need to create the following User Interfaces using JSP.

Step1.Crate UserRegistration.jsp with following code.

Step 2. Create MainPage.jsp page

Step 3. Create Menu.jsp

Step 4. Create Header.jsp

Step 5. Create LeftNav.jsp page

Step 6. Create RightNav.jsp page

Step 7. Create Success.jsp page

Step 8. Create Error.jsp page.

Note: If you get errors try to debug yourself and surely you will learn many more things.