Here is the list of the common viva questions and answers for the Java Web Projects, during the project submission, you face many questions from your project.
Q) Explain the project flow
A) To understand the project flow you need to execute the complete project and explain the main key point of the project. Here I am going to explain by an example.
For example, Your project is “Student Management System”. So simple you can start ANS:
The student management system is a web-based application that helps to manage the students of any college, organization, or institute.
Where admin has all the control to manage students or faculty like Add/ Delete / Update records. same from the user side like a student can manage his record and It can be based on your project.
You need to focus on the functionalities of your project. Just explain all the functionalities of your project.
Viva questions and answers for the Java project
Q) What technologies are you using in the project?
A) I am using Java as the core technology to maintain the front view part I am using JSP, HTML, CSS, and JS. To handle the server request I am using servlet and to store data or maintain the back-end records using the MYSQL database.
Below is a brief definition of the technologies used in the project
HTML
The project uses HTML to create front-end GUI functionality like input fields, Headings of all pages, page titles, Buttons ETC. Html provides Tags for every part of page design. For example, I am creating a footer for the page. So there is a footer page available similarly header tag for the header part and the body tag for the body part of the page. We can add images as well using the <img > tag.
Java Script
Js is a programming language mostly used to set the validation on the client side. As the Java script team is updating their technologies these days lot’s of frameworks are available like Node JS, view JS, and react js. Which supports the client site as well as the server site. Js is the one the big programming which supports all the things. It is open-source so it’s used widely. We are using js in our project to create front-end validation. We are using js to set proper validation for the input fields like DOB, and password Fields.
CSS
We are using CSS for designing purposes. It helps to create more attractive HTML pages. CSS and its updated versions like css3 and css5 support animation and some advanced design things. Which makes our application more attractive. We are using CSS3 for basic use like managing divisions’ passions. To add some color to the heading and footer page.
Servlet
I am using Servlet as a server-side programming language. Which is responsible for handling the request that is coming from the view part. As we are using MVC architecture the controller part would be handled by the only servlet by the post and Get methods.
Server
I am using the Tomcat server which is provided by the Apache corporation and its open-source server. Which is helps to deploy and run our application on the localhost server? It will generate a local URL with the localhost and port number(XXXX) with the project name. It will help to compile and run our JSP and servlet code as well.
JAVA
Java is the core programming language for this project. To perform the bean operation, the logical operation we are using is java. In the project, we use the object model which is followed by Java. It is open-source programming and provides all the support on the client-side as well as server side. We are using Java code and syntax in Servlet. As well as using JSP also for logic operations like IF else or conditional statements.
MYSQL
It is a relational database management system. In this project, we are using MySQL to store the data of employees. There is a separate table to divide the data and each table is related to others. Unique and foreign keys are responsible for the relations between the tables.
To operate the database we are using the MYSQL workbench which is quite simple and easy to understand. MYSQL server is running on port number 3306 with the username “root” and password “root”.
Q) What is MVC and why you are using MVC in your project?
While building your college project or your first Java project it’s really important to manage all the source files manage in a proper way. So we are using MVC with every Java project to manage the View part, Controller part as well as model part. The model (Model package) in every java project contains all the database-related source code. All the transactions are used to get data from the database and insert data into the database. JDBC-related code. Building a Java project with Maven is really simple and good practice to manage your source code as well as for the industry standards. MVC is not a tool it’s a way of programming.
Q) What is Maven?
A maven is a tool that is used to manage the Jar files of your project in an easy or proper way. And It happens only some min line of code. You just need to add a 3-4 line code in the Pom.XML file. When we create a project with the maven tool. It will create a Pom.xml automatic. This is the file that contains all the dependencies (code of the Jar files). That we need to add inside the <dependencies></dependencies> tag. And don’t worry we do not need to create that 4 lines. This code is easily available on the internet you just need to Google about it.
Q) Where did database connectivity in your project?
We are using a Model package to maintain the database transactions and write common code to connect the database in the properties file.
Q) Where is the Code of Controller, Model, and view in the project?
Please follow the below screenshot to get the Idea where is the code about the controller, Model, and View.
Here Controller means Servlet, View means JSP and Model means Database transaction.
Q) How to run Java Web (J2ee)Project
Step 1: Right Click on the project name on Eclipse.
Step 2: Then go to ‘run as’.
Step 3: Then go to click on ‘run on server’.
Step 4: Then click on ‘next’ and ‘finish’.