Professional Documents
Culture Documents
Servlet
Servlet
Servlet
what is servlet : servlet is a java class that runs in a web server.It cannot be
able to run
in normal jvm,So it is not a POJO class. It accepts request from html file,
processess that request and finally
forward the response to the client's web browser through html file.
All servlert/Java web Technical classes & interfaces are present in javaX.servlet,
javax.servlet.http &
javax.servlet.jsp packages.
1.Servlet interface
2.GenericServlet class
3.HttpServlet class
4.ServletRequest interface
5.ServletResponse intierface
6.HttpServletRequest
7.HttpServletResponse
ServletRequest interface accepts the web client's request and forwards to the
servlet class.
It is child interface of ServletRequest.
ServletResponse interface interface forwards the servlet's output to the client's
browser.
HttpServletResponse interface forwards the servlet's output to the http client's
browser.
Apache tomcat is a web Server.It can execute java classes.its default port number
is 8080.
What is Jsp?
Java Server Pages
It is a java based web development technology which is alike a html page,Here same
manner css,bootstrap &
javascript codes can be attached like html page. It supports 1.all html tags 2. all
css,bootstrap scripting codes,
3.own tags (developed based on jav applications,perform to process the data,that's
why they called themselves an action tag).
4. java programming code.So it is an extension of html page.In industry jsp pages
are used for view purpose i.e accept input from users
& display processed output.
However usage of java code inside jsp page is considered as ideal practice in
industry.
Actually jsp is a disguised servlet.
All jsp files are converted into a servlet which extends HttpJspBase class (It is a
drived class of HttpServlet).