1. Workshop on JSP
Manish Mathuria
Assistant Professor (CS)
Poornima Group of Institution
5/26/2020 1
2. Contents
• Introduction to Advance Java
• The Role of Java in Dynamic Web
Development
• How to use Java with HTML, CSS and
JavaScript?
• Database connectivity with Java (JDBC)
• Student Data fetching from Database and
display it on Web Page.
5/26/2020 2
3. Introduction to Advance Java
• What is Java?
– a general-purpose computer programming language
designed to produce programs that will run on any
computer system.
• Where is Java?
– Java Card for smart-cards
– Java Platform, Micro Edition (Java ME)- targeting
environments with limited resources.
– Java Platform, Standard Edition (Java SE)- targeting
workstation environments.
– Java Platform, Enterprise Edition (Java EE)- targeting
large distributed enterprise or Internet environments.
5/26/2020 3
4. Introduction to Advance Java
• Why Java?
– It is class-based and object-oriented, intended to
let application developers “Write Once Run
Anywhere” (WORA).
– Java applications are typically compiled to
bytecode (class file) that can run on any Java
Virtual Machine (JVM) regardless of computer
architecture.
5/26/2020 4
5. Introduction to Advance Java
• When Java?
– Java was originally developed by James Gosling at
Sun Microsystems (which has since merged into
Oracle Corporation).
– Originally named OAK in 1991.
– First non commercial version in 1994.
– Renamed and modified to Java in 1995 and
released as a core component of Sun
Microsystems’s Java Platform.
– Hot Java : The first Java-enabled Web browser.
5/26/2020 5
6. Introduction to Advance Java
• Advace Java = J2EE
• It is a platform independent, Java Centric
environment from Sun for developing building
and deploying Web-based enterprise
application online.
• It can be used to develop server-side
applications such as Java servlets, Java Server
Pages and Java Server Faces.
5/26/2020 6
8. The Role of Java in Dynamic Web
Development
• What do you understand by Client and Server?
5/26/2020 8
9. The Role of Java in Dynamic Web
Development
• What is Servlet?
– It is a server-side programming language class
used for making dynamic web pages. They reside
within a servlet engine.
– Servlets receive and respond to requests from
Web Clients, usually across HTTP.
– It provicde concurrency, portability and efficiency.
5/26/2020 9
10. The Role of Java in Dynamic Web
Development
• Servlet life cycle
– All methods are performed by Container
– Initialize using init() method when requested
– Service() method handles requests/clients. The
requests are forwarded to the appropriate
method (i.e. doGet() or doPost())
– Server removes the servlet using destroy()
method
5/26/2020 10
11. How to use Java with HTML?
• Servlet: HelloWorld Example
5/26/2020 11