



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
advance java few topics, including jsp, servlet etc
Typology: Study notes
1 / 5
This page cannot be seen from the preview
Don't miss anything!




ServletRequestInterface:-
servlet interface is an interface which is used to get request information to the servlet
Requset Dispatcher Interface
It is an interface which is used to dispatch the request to another resource it can be html file or jsp file or another servlet. they have 2 method:
sendRedirect is the predefined method of HTTP servlet response interface it is used to redirect one servlet to the another resourese that another resourse can be jsp,servlet, html page. It always works on the client side.
ServletConfig is an interface which is used to get configuration information from web.xml file. The object of servlet config is created for each servlet. If we do any modification in web.xml file no need to change the servlet.
Session:- Session is a particular interval of time to identify the particular user we use session management.
Session Management techniques:-
There are 2 types of cookies:
Disadvantages:-1. it will not work if the cookie is disabled from browser.
Advantage- 1. it will always work if cookei will desable or not
dis- 1. it will work on server side
ServletContext:- ServletContext is an interface which is used to get configuration information from web.xmlfile Object of servletcontext is created for each page. We will use context param tag to get the information. It is used whenever we have to share the information to all the servlets If we do any modification in web.xml file no need to change the servlet.
JSP is extension to servlet it is also used to create, web applocations like servlet it is the combination of html tag and jsp tags. it separates the business logic from design Advantages:-
two packages
The classes are as follows:-
a. import contentType extends info buffer language isELIgnored isThreadSafe autoFlush session pageEncoding errorPage isErrorPage
syntax of page directive:- <%@page attribute="value"%>
Bean is a class which should implements serializable interface. It can have getter an setter methods. It should not no argument constructor.
Use bean is used to instantiate the bean class.