SBS1301 ADVANCED JAVA Total
L T P Credits
PROGRAMMING Marks
4 0 0 4 100
UNIT I
J2EE Platform– Enterprise Architecture Styles – J2EE API - J2EE Architecture for
Containers – RMI Architecture- Overview of JNDI Java Database Connectivity –Introduction
– Driver Types- Establishing a connection - Creating and Executing SQL Statement –
UNIT I Prepared Statement -The Result Set Object- [Link] package- Simple Application.
UNIT II
UNIT II
UNIT III
Java Script:-Embedding Java Script In HTML - Variables - Literal - Conversion Functions -
Arrays - Java Script Programming - Statements – Functions - Events Handling - Working
With Objects – Date, Math, String, Window, Calendar -Connecting To Search Engines.
UNIT III
Servlets- Background- Life Cycle of a Servlet- HTTP protocol- The Servlet API – Generic and
Http Servlet- ServletConfig and ServletContext- Handling HTTP Requests and Responses-
Handling form data with get and post request.
SBS1301 ADVANCED JAVA Total
L T P Credits
PROGRAMMING Marks
4 0 0 4 100
UNIT IV `
Advanced Servlets: Approach to Session Tracking - HTTP Session Interface –
Demonstrating Session – Lifecycle with cookies – A simple Shopping cart using Sessions –
Servlet Context Interface – Servlet Context Lifecycle – Event Handling – Servlet
UNIT IV and Collaboration – Servlet Chaining – Request Dispatching.
UNIT V UNIT V
Java Server Pages - JSP Technologies – Difference between Servlets and JSP- JSP
Directives –Scripting elements - Standard Actions – Implicit Objects –Simple Application -
Introduction to Enterprise Java Beans –Session Beans-Entity Beans-Message Driven Beans.
Servlet Context Interface
Servlet Context Interface
• An object of ServletContext is created by the web container at time of deploying
the project.
• This object can be used to get configuration information from [Link] file.
There is only one ServletContext object per web application.
• If any information is shared to many servlet, it is better to provide it from the
[Link] file using the <context-param> element.
Advantage of ServletContext:
• Easy to maintain if any information is shared to all the servlet, it is better to
make it available for all the servlet. We provide this information from the
[Link] file, so if the information is changed, we don't need to modify the
servlet. Thus it removes maintenance problem.
Servlet Context Interface
Servlet Context Interface
Servlet Context Interface
Servlet Context Interface
Servlet Context Interface
Servlet Context Interface
Servlet Context Interface
Servlet Context Interface
Example of ServletContext to get the initialization parameter
Servlet Context Interface
Servlet Context Interface
Servlet Context Interface
Example of Servlet Context to set and get attribute
Servlet Context Interface
Servlet Context Interface
Servlet Context Interface
Servlet Context Interface
Servlet Context Lifecycle
Servlet Context Lifecycle Event
Event Handling
Events are basically occurrence of something. Changing the state of an object is known as an event.
We can perform some important tasks at the occurrence of these exceptions, such as counting total and
current logged-in users, creating tables of the database at time of deploying the project, creating database
connection object etc..
There are many Event classes and Listener interfaces in the [Link] and [Link] packages.
1. ServletContextEvent(ServletContext e)
2. HttpSessionEvent
Servlet Collaboration
Servlet Collaboration
Servlet Collaboration
Servlet Collaboration
Servlet Collaboration
Servlet Request Dispatcher
Request Dispatcher is an interface, implementation of which defines an object which can dispatch
request to any resources(such as HTML, Image, JSP, Servlet) on the server.
Servlet Request Dispatcher
Servlet Request Dispatcher
Servlet Request Dispatcher
Example
Servlet Request Dispatcher
Servlet Request Dispatcher
Servlet Request Dispatcher
Servlet Request Dispatcher