As we all know, API stands for Application Programming Interface. What does it means ? It is collection of Java interfaces, classes and requires documentation for using in programming for the Java Developers. Each class and interface are as abstract method declared to develop the servlet program effectively. Servlet is used for creating dynamic web pages based on server side. There are lots of server based technologies, used to create and send dynamic web pages from server, but servlet has many advantage compare to those technologies. Combining those 2 makes java servlet programming very effective
Servlets can respond to any type of request, they are commonly used to extend the applications hosted by web servers. Advantage of using servlet is these are Robust (No worry for memory leak), Better performance (create thread of each request not process), Portability & Secure.
There are 2 important packages used in most of Servlet API's development :-
1) javax.servlet and 2) javax.servlet.http packages. The entities inside javax.servlet.http are only for https requests and responses.
The list of important Interfaces in javax.servlet package :-
Servlet
ServletRequest
ServletResponse
RequestDispatcher
ServletConfig
ServletContext
The list of important Interfaces in javax.servlet.http package :-
HttpServletRequest
HttpServletResponse
HttpSession
コメント