Full Stack Development Using Java – Short Notes
1. What is Full Stack?
Full Stack Development means working on Front-End, Back-End, and Database of a web application.
2. Front-End (Client Side)
- HTML – Page structure
- CSS – Styling and layout
- JavaScript – Dynamic behavior
- Bootstrap – Responsive UI
- AJAX – Background data loading
Purpose: User interface, forms, buttons, layouts.
3. Back-End Using Java (Server Side)
- Java Programming
- Servlets – Handle HTTP requests
- JSP – Dynamic web pages
- JDBC – Connect Java to database
- Spring MVC – MVC architecture
- Spring Boot – Easy Spring applications
Purpose: Business logic, processing, sending data to front-end.
4. Database Layer
- MySQL / Oracle
- CRUD operations – Create, Read, Update, Delete
- Hibernate ORM – Maps Java objects to tables
5. Important Tools
- JDK – Java development
- Eclipse / IntelliJ – IDEs
- Apache Tomcat – Server
- Maven – Dependency management
- Git & GitHub – Version control
6. How a Full Stack App Works
- User interacts with Front-End
- Request goes to Java Back-End
- Back-End interacts with Database
- Output returned to Front-End
- User sees the result
7. Skills Required
- Java, Servlets, JSP
- Spring MVC / Spring Boot
- HTML, CSS, JavaScript
- SQL & Database
- Git and deployment basics
EXERCISE 1 – IDE INSTALLATION (VIVA WITH ANSWERS)
- What is an IDE?
Answer: An IDE is an Integrated Development Environment used for writing, compiling, debugging, and running programs. - Give two examples of Java IDEs.
Answer: Eclipse and IntelliJ IDEA. - What is the purpose of JDK?
Answer: JDK provides compiler, JVM, and libraries for Java development. - Difference between JDK and JRE.
Answer: JDK is for development; JRE is only for running programs. - How to create a new project in Eclipse?
Answer: File → New → Java Project → Provide name → Finish. - What is a workspace?
Answer: The place where Eclipse stores all projects. - What is a package?
Answer: A namespace that groups related classes. - How to debug in IDE?
Answer: Add breakpoints and run in Debug Mode. - What is Build/Compile?
Answer: Converts .java files to .class bytecode. - How to import an existing project?
Answer: File → Import → Existing Projects into Workspace. - Use of Console window?
Answer: Displays output and errors. - What is MySQL?
Answer: A relational database system. - What is JDBC driver?
Answer: Allows Java to connect to databases. - Why use IDE instead of Notepad?
Answer: Offers debugging, auto-complete, and tools. - What is a Build Path?
Answer: Configuration for JRE and libraries.
EXERCISE 2 – SERVLETS (VIVA WITH ANSWERS)
- What is a Servlet?
Answer: A Java class that handles HTTP requests and responses. - Servlet packages?
Answer: javax.servlet and javax.servlet.http. - Servlet lifecycle methods.
Answer: init(), service(), destroy(). - Use of doGet()?
Answer: Handles GET requests. - Use of doPost()?
Answer: Handles POST requests. - What is PrintWriter?
Answer: Sends HTML output to browser. - How to link HTML to Servlet?
Answer: Use form action="ServletName". - What is session tracking?
Answer: Maintaining user data across pages. - Two session tracking methods.
Answer: Cookies, HttpSession. - What is a Cookie?
Answer: A small file stored on browser. - Auto-refresh a Servlet page?
Answer: response.setHeader("Refresh", "5"); - Use of JDBC in Servlets?
Answer: Database operations like insert/update. - What is web.xml?
Answer: Deployment descriptor. - What is RequestDispatcher?
Answer: Used to forward or include resources. - Forward vs sendRedirect.
Answer: forward is server-side; sendRedirect is client-side.
EXERCISE 3 – MVC (VIVA WITH ANSWERS)
- What is MVC?
Answer: Model–View–Controller architecture. - What is Model?
Answer: Handles business logic and data. - What is View?
Answer: User interface (JSP, HTML). - What is Controller?
Answer: Handles requests and connects Model and View. - Why use MVC?
Answer: To separate logic and UI. - What is MVC mapping?
Answer: Linking URLs to controllers. - Role of Controller?
Answer: Processes input and returns View. - What is deployment?
Answer: Running application on server. - Which file defines routing?
Answer: web.xml. - Example of View technology.
Answer: JSP. - Benefit of MVC.
Answer: High maintainability. - Example of Controller in Java.
Answer: Servlet.
EXERCISE 4 – SPRING MVC (VIVA WITH ANSWERS)
- What is Spring MVC?
Answer: A Java framework using MVC design. - What is DispatcherServlet?
Answer: The front controller of Spring MVC. - Where is DispatcherServlet configured?
Answer: In web.xml. - Use of @Controller?
Answer: Marks a class as a Controller. - Use of @RequestMapping?
Answer: Maps URLs to methods. - What are Spring Beans?
Answer: Objects managed by Spring container. - Where to define beans?
Answer: XML or annotations. - What is ViewResolver?
Answer: Finds which JSP page to load. - What is applicationContext.xml?
Answer: Spring configuration file. - Use of Maven?
Answer: Dependency management. - What is Model?
Answer: Carries data to the View. - How to return JSP?
Answer: Return the logical view name. - How to run Spring MVC?
Answer: Deploy on server like Tomcat. - What is InternalResourceViewResolver?
Answer: Maps view names to JSP paths. - Why is Spring MVC popular?
Answer: Lightweight and annotation-based.
EXERCISE 5 – HIBERNATE (VIVA WITH ANSWERS)
- What is Hibernate?
Answer: A Java ORM framework. - What is ORM?
Answer: Object Relational Mapping. - What is POJO?
Answer: Simple Java class with getters/setters. - What is hibernate.cfg.xml?
Answer: Hibernate configuration file. - What is SessionFactory?
Answer: Creates Session objects. - What is Session?
Answer: Used to interact with database. - How to save an object?
Answer: Using session.save(). - What is HQL?
Answer: Hibernate Query Language. - Hibernate annotations?
Answer: @Entity, @Id, @Table etc. - What is inheritance mapping?
Answer: Mapping parent-child classes. - What are associations?
Answer: One-to-One, One-to-Many, Many-to-Many. - What is a Transaction?
Answer: A unit of work using beginTransaction(). - What is Criteria API?
Answer: Programmatic query building. - What is lazy loading?
Answer: Loads data only when required. - Benefit of Hibernate?
Answer: Reduces boilerplate code.
EXERCISE 6 – DEBUGGING TOOLS (VIVA WITH ANSWERS)
- What is debugging?
Answer: Finding and fixing errors. - Two Java debugging tools.
Answer: Eclipse, IntelliJ. - What is a breakpoint?
Answer: A point where execution stops. - What is Step Into?
Answer: Goes inside method calls. - What is Step Over?
Answer: Skips entering method. - What is Step Return?
Answer: Exits a method and returns. - Debug perspective?
Answer: Shows variables, stack, breakpoints. - Watch window?
Answer: Shows values of variables. - What is runtime error?
Answer: Error during execution. - What is Exception?
Answer: Abnormal event breaking flow. - How to inspect variables?
Answer: Using the Variables window. - Why is debugging important?
Answer: Ensures correctness and stability.