Professional Documents
Culture Documents
Table of Contents
Core Java
1. Introduction to OOPS & Java Programming
2. Language
3. Variables
4. Control Structures
5. Data Types
6. Classes and Objects
7. Abstract, Static and Final
8. Inheritance
9. Packages
10.
Interfaces
11.
Exception Handling
12.
IO Package
13.
String Handling
14.
Threading and Multithreading
15.
Serialization
16.
Collection Framework
17.
Lang Package
18.
Files and Streams
19.
Networking Package
20.
Applets and AWT
21.
Event Handlers and Listeners
22.
JFC
23.
Swings
24.
Security
Advanced Java
J2EE Module I
1. Introduction to J2EE Architecture
2. J2EE Components and Technologies
3. JDBC
a. Types of Drivers
b. JDBC Classes and Interfaces
c. Statements
d. Prepared Statements
e. Callable Statements
f. Scrollable Result Sets
g. Batch Updations
h. Save Points
i. Row Sets
4. Servlets
a. Life Cycle
b. Introduction to HTTP
c.
d.
e.
f.
g.
h.
i.
j.
k.
l.
5. JSP
a.
b.
c.
d.
e.
f.
g.
h.
i.
j.
k.
l.
m.
HTML Basics
Servlet Classpath
Http Servlet Request
Http Servlet Response
Request Dispatcher
Managing Cookies
Session Handling
Filters
Listeners
Web.xml Deployment
MVC Architecture
Life Cycle
Tags
Directive Tags
Declaration Tags
Expression Tags
Scriplets
Comments
Implicit Objects
Standard Action Tags
Error Pages
Custom Tags
Types of Custom Tags
J2EE Module II
1. STRUTS
a. Struts Architecture
b. MVC And Model 2
c. More XML, Less Java!
d. Action Mappings
e. Command Pattern for web applications
f. ActionServlet
g. Action and Action Mapping
h. Struts Configuration
i. Selecting a forward
j. Global Forwards
k. Declarative Exception Handling
l. Global Exception Handlers
m. Forms
i. Working with HTML Forms
ii. Action Forms a/k/a Form beans
iii. Relationship to Input
iv. Relationship to actions
v. Relationship to the model
vi. Relationship to the Output
vii. DynaActionForm and Map-Backed Forms
viii. Validation
ix. Struts Tag Libraries
n.
o.
p.
q.
r.
2. XML
a.
b.
c.
d.
Elements/Entities of XML
DTD
XML Syntax and parsing
Elements, tags and attributes
3. JAAS
a.
b.
c.
d.
e.
f.
g.
XML
Role of XML
Role and function of a DTD
XML schema structure
JAXP: the Java XML API
XML Parsers for Java
Role of SAX and DOM
a. Session Faade
b. Message Faade
c. Service Locator
d. Value Object
e. Value Object Factory
f. Single term pattern
2. Introduction to web servers (JBoss/Weblogic/websphere)
3. HIBERNATE
a. Installation and setup
b. Introduction to mapping
c. Writing a mapping document
d. Generating some class
e. Cooking up a schema
f. Connecting hibernate to MySQL
g. Harnessing Hibernate
i. Creating persistent Objects
ii. Finding Persistent Objects
iii. Better ways to build queries
h. Collections and Associations
i. Mapping collections
ii. Persisting collections
iii. Retrieving collections
iv. Using bidirectional associations
v. Working with simple collections
i. Criteria Queries
i. Using simple criteria
ii. Compounding criteria
iii. Applying criteria to associations
iv. Querying by example
j. A Look at HQL
i. Writing HQL queries
ii. Selecting properties and pieces
iii. Sorting
iv. Working with aggregate values
v. Writing native SQL queries.
4. SPRING
a. Introduction to Spring
b. The Spring application context
c. XML Configuration
d. Working with existing singletons and factories
e. Working with multiple configuration files
f. Understanding the bean lie cycle
i. XML Namespaces initialization, use and destruction phases
ii. Working with spring interceptors
iii. Externalizing constant values into properties files
iv. Bean scopes
g. Simplifying application configuration
i. Bean definition inheritance
ii. Inner beans and util namespaces
iii. Dependency injection of collections
iv. Spring Expression Language(SpEL)
Introduction
Request, browsers
XML HTTP Request
Server Script, Advanced
Database
XML File
CORE JAVA
Introduction to OOPS & Java Programming
Problems with Procedural programming
o Data does not have the owner.
This means the data can be accessed by anybody in the program and if any
problem arises because of any function, it will be difficult to identify who is the
culprit. This causes the failure in data integrity
o Functions are the building blocks and the flow of execution will be continuous in
nature which cause achieving some functionality difficult.
o Examples of procedural languages are like COBOL, FORTRAN, BASIC, PASCAL, C, C++
etc.
o The main problem with this programming languages along with the data integrity is
with the uninitialized variables where these variables will take garbage values without
any warning.
o One more major problem with this is resource de-allocation. When this resource deallocation is not handled properly, it leads to memory leaks which in-turn brings down
the application abruptly.
o These languages will not support the concept of abstraction
Objects and Classes
o Object Concept
An object is nothing but encapsulation of data
An object will have the following characteristics
An unique identity
o This is nothing but a unique reference of the object to identify
State
Class
Read only
Write only
No access
Language
Java language is used to develop applications for a wide range of environments from
consumer devices to heterogeneous enterprise systems. In this section we will look into the
environment that is required to develop a java application and we look into the java
components and the java platform.
The general tip for the java developers is to look at the offline java API docs which is also
called as java docs.
Like any programming language, java language also has its own syntax, grammar rules and
programming paradigms. This language is completely developed based on the oops concepts.
Java language is a derivative of C and so the syntax rules used in java are very similar to C,
for example the code blocks are modularized into methods and are delimited by curly braces.
Structurally java language starts with packages. These packages are the name space
mechanism being used in java. Within packages are the java classes and within java classes
are the methods, variables and constants and so on. As we proceed further we will discuss
about all these components.
COMPILER
Generally when you write a java program, first you write the source code in .java files and
then compile those java files. The compiler checks your source code against the syntax rules
which are defined as per the specifications defined and then create the bytecodes and write
the byte codes in the form of the class files. Bytecodes are standard instructions that are
targeted to run on a java virtual machine. This JVM is designed specifically for each different
platform. This is the mechanism which is used to run a java application on many different
platforms and this is the mechanism which gives the java the capability to write once and run
anywhere. This means, we can run a java application in any OS. By adding this level of
abstraction, java differs from other programming languages where programs write the
instructions targeted towards the particular CPU on which the application is running.
JVM
Once the application is compiled and the bytecode representation of the code is created in
the form of class files, the JVM then reads that bytecode and interprets and then executes
those instructions on the native hardware platform for which that particular JVM was written.
Here the main thing to understand is that JVM interprets the bytecode just as how the
underlying OS interprets the assembly language instructions.
GARBAGE COLLECTOR
The memory management in java is taken care by the mechanism called garbage collector.
When the application creates a new object, jvm automatically allocates the memory for that
object from the heap which is a pool of memory set aside for the program to use. The java
garbage collector will be always running on the background tracking what and all are the
objects are not being used in the application and once that identification is done, they will be
removed from the memory thereby freeing the memory automatically. This approach is called
implicit memory management because we dont want to write any code to handle the
memory specifically. This is one of the most important feature for java performance.
THE JAVA DEVELOPMENT KIT
In order to develop the java applications and wants them to be compiled, we need the JDK.
You can download this JDK for free of cost from the sun site. This jdk comes along with the
compilers and other tools required in the application development process. In JDK you will
get all the pack of pre built classes and utilities required to develop a java application.
THE JAVA RUNTIME ENVIRONMENT
The java runtime environment also known as java runtime includes the JVM, code libraries,
and components that are required for running a java application. This will be available for
different OS platforms.
RESERVED WORDS:
The following are the reserved used being used in java,
Abstract, assert, Boolean, break, byte, case, catch, char, class, const, continue, default, do,
double, else, enum, extends,final, finally, float, for, goto,if, implements, import, instanceof,
int, interface, long, native, new, package, private, protected, public, return, short, static,
strictfp, super, switch, synchronized, this, throw, throws, transient, try, void, volatile, while.
Also note that true, false and null are technically not reserved words. Although they are
literals they are included in this list because we cant use them as names of java constructs.
Now we will start programming with java. For the purpose, we will write a simple java
program.
Class HelloWorld {
public static void main(String args[]) {
System.out.println(Hello World);
}
}