Internship outline of java:
Phase 1: Java Fundamentals & JDBC Basics
Goal: Establish a strong foundation in core Java programming and database interaction
using JDBC.
Topics:
● Day 1-2: Java Basics Refresher
○ Introduction to Java: What is Java, JVM, JRE, JDK, platform independence.
○ Variables and Data Types: Primitive types, reference types, type casting.
○ Operators: Arithmetic, relational, logical, assignment, unary.
○ Control Flow Statements:
■ if-else, switch
■ for, while, do-while loops
■ break, continue
○ Arrays: One-dimensional and multi-dimensional arrays.
○ Methods: Defining, calling, parameters, return types, method overloading.
○ Object-Oriented Programming (OOP) Concepts - Introduction:
■ Classes and Objects: Blueprint vs. instance.
■ Encapsulation: Access modifiers (public, private, protected,
default).
■ Constructors.
■ this keyword.
● Day 3-4: More OOP & Exception Handling
○ OOP Concepts - Deeper Dive:
■ Inheritance: extends keyword, method overriding, super keyword.
■ Polymorphism: Compile-time (overloading) vs. Runtime (overriding).
■ Abstraction: Abstract classes and methods, interfaces.
○ Packages: Organizing classes.
○ Exception Handling:
■ try-catch-finally block.
■ throws keyword.
■ Checked vs. Unchecked exceptions.
○ Collections Framework - Introduction:
■ ArrayList, HashSet, HashMap (basic usage).
● Day 5-7: JDBC (Java Database Connectivity)
○ Database Concepts (Brief Overview): Relational databases, tables,
columns, rows, SQL basics (SELECT, INSERT, UPDATE, DELETE).
○ Introduction to JDBC: What it is, JDBC architecture (Driver Manager, Driver,
Connection, Statement, ResultSet).
○ Setting up JDBC:
■ Adding JDBC driver (e.g., MySQL Connector/J, PostgreSQL JDBC
Driver) to classpath.
■ Connecting to a database.
○ Executing SQL Queries:
■ Statement: For static SQL queries.
■ PreparedStatement: For parameterized and more secure queries
(highly recommended).
○ Retrieving Data: ResultSet methods (next(), getString(), getInt(),
etc.).
○ Inserting, Updating, Deleting Data: executeUpdate() method.
○ Resource Management: Closing Connection, Statement, ResultSet in
finally blocks.
○ Mini-Project: A simple console-based application that performs CRUD
operations on a local database table (e.g., a simple student record system or
product inventory).
Phase 2: Servlets - The Foundation of Java Web
Goal: Understand how Java handles web requests and responses using Servlets.
Topics:
● Day 8-9: Web Application Fundamentals & Servlet Basics
○ Introduction to Web Applications: Client-server architecture, HTTP
request-response cycle, web servers (e.g., Apache Tomcat), web containers.
○ Setting up a Web Development Environment:
■ Install JDK (if not already done).
■ Install Apache Tomcat (or similar servlet container).
■ Basic IDE setup (e.g., Eclipse IDE for Enterprise Java and Web
Developers, IntelliJ IDEA Community Edition).
○ Servlet Introduction: What are Servlets, their role in web applications.
○ Servlet Life Cycle: init(), service(), destroy().
○ HttpServlet Class: Handling HTTP methods (doGet(), doPost()).
○ Request Dispatching: RequestDispatcher (forward(), include()).
○ Deployment: WAR files, deploying to Tomcat.
○ web.xml (Deployment Descriptor): Mapping Servlets, welcome files.
● Day 10-11: Servlet Request & Response, State Management
○ HttpServletRequest: Reading request parameters (getParameter(),
getParameterValues()), headers, request attributes.
○ HttpServletResponse: Setting response headers, sending redirects
(sendRedirect()), writing HTML output (getWriter()).
○ State Management in Web Applications:
■ Cookies: Storing small amounts of client-side data.
■ HttpSession: Storing user-specific data on the server side.
■ Context (ServletContext): Application-wide data.
■ Request Attributes: Data for the current request.
○ Form Handling: Submitting HTML forms to Servlets (GET vs. POST).
● Day 12-14: Connecting Servlets to JDBC & Error Handling
○ Integrating Servlets with JDBC:
■ Creating a simple user registration form that saves data to the
database via a Servlet.
■ Displaying data from the database using a Servlet.
○ Servlet Configuration: init-param in web.xml and @WebInitParam
annotation.
○ Basic Error Handling:
■ Using try-catch blocks within Servlets.
■ Custom error pages in web.xml.
○ Mini-Project: A simple user management system where users can register,
log in (basic), and view a list of registered users. Data should be persisted in
a database using JDBC.
Phase 3: JSP - Presentation Layer & Putting it All Together
Goal: Learn how to create dynamic web pages using JSP and integrate it with Servlets and
JDBC to build a complete application.
Topics:
● Day 15-16: JSP Fundamentals
○ Introduction to JSP: What it is, why it's used (separation of concerns), JSP
life cycle.
○ JSP Syntax:
■ Scriptlets (<% %>): Embedding Java code (discouraged for logic).
■ Expressions (<%= %>): Displaying values.
■ Declarations (<%! %>): Declaring class members.
■ Directives (<%@ %>): page, include, taglib.
○ JSP Implicit Objects: request, response, session, application, out,
config, pageContext, page, exception.
○ Including Content: <%@ include file="..." %> vs. <jsp:include
page="..." />.
● Day 17-18: JSP Actions & EL/JSTL
○ JSP Standard Actions (<jsp:action>):
■ <jsp:forward>: Forwarding requests.
■ <jsp:useBean>: Creating/accessing JavaBeans.
■ <jsp:setProperty>, <jsp:getProperty>: Setting/getting bean
properties.
○ JavaBeans: Simple Java classes following conventions (private fields, public
getters/setters).
○ Expression Language (EL):
■ Simplified access to JavaBeans properties, map values, array
elements.
■ Scope resolution.
■ Basic operators.
○ JSTL (JSP Standard Tag Library) - Introduction:
■ Why JSTL: Eliminating scriptlets, cleaner JSP code.
■ Core Tags (c:forEach, c:if, c:choose, c:when, c:otherwise,
c:out).
■ Setting up JSTL (JAR files).
● Day 19-21: MVC Pattern & Complete Web Application
○ Introduction to MVC (Model-View-Controller) Pattern:
■ Model: Business logic, data access (JavaBeans, DAO).
■ View: Presentation (JSP).
■ Controller: Request processing, invoking model, selecting view
(Servlet).
■ Benefits of MVC.
○ Implementing MVC with Servlets and JSPs:
■ DAO (Data Access Object) Pattern: Abstracting database
operations.
■ Front Controller Servlet: A single Servlet handling all requests, then
delegating to appropriate JSPs or other Servlets/classes.
○ Building a CRUD Application:
■ Design and implement a simple web application (e.g., a simple
product catalog or a task manager).
■ Use Servlets as controllers.
■ Use JSPs for views (displaying lists, forms for add/edit).
■ Use JavaBeans/POJOs as models.
■ Use JDBC and DAO pattern for database interaction.
■ Implement features like:
■ Listing all items.
■ Adding a new item.
■ Editing an existing item.
■ Deleting an item.
○ Deployment of the final application.
Tools & Resources:
● JDK (Java Development Kit): Latest stable version.
● Apache Tomcat: Version 9 or 10.
● IDE: Eclipse IDE for Enterprise Java and Web Developers.
● Database: MySQL (with MySQL Workbench).
● JDBC Driver: Download the appropriate JAR for your chosen database.
● JSTL JARs: jstl.jar and standard.jar.
● Browser: Chrome.