Monday 13 June 2016

What is Java Server Page (JSP)

JavaServer Pages (JSP) is a extension to Java Servlet which facilitates the mixing of dynamic and static web contents. The main page is written in regular HTML, while special tags are provided to insert pieces of Java programming codes. The business programming logic and the presentation are cleanly separated. This allows the programmers to focus on the business logic, while the web designer to concentrate on the presentation.jsp is not replacement for servltes .


Key Points-

-Jsp is one of the web technologies from sun microsystem.
-Jsp is a J2EE Technology.
-Jsp is a specification for web container(eg: Tomcat).
-JSP (Capital letters) implies whole technology.
-Jsp(small letters) implies java server page.
-Jsp page contains html code and java code.
-In servlets,HTML code inside java methods but in jsp,java code written inside html tags.
-Call custom Java classes, called taglibs, using HTML-like tags.
-Separate the dynamic content of a Web page from its presentation.
-A jsp is a pure text file with any name but with ‘.jsp’ extension.
-A jsp on its own cannot process a client request.It will be translated into a servlet by JSP engine.that container gererated servlet serves the client request .Overview of How JSP Requests Are Handled




-Developing a jsp is nothing but instead of we writing a servlet,we instruct the container to write a servlet for us.
-We just use the servlet where it is advantages and where a servlet lacks,there the advantage of a jsp is used(ie,a jsp is loosly coupled,it is good at presenting output these are the advantages of a jsp).


What is Java Server Page (JSP)

JavaServer Pages   (JSP) is a   extension  to   Java Servlet  which facilitates the   mixing  of dynamic and static web contents . The mai...