Like Servlet, JSP is another server side technology which is used to develop dynamic web application. Basically it represents the presentation logic of the web apllication.
JSP pages are easier to maintain than Servlet. Servlet adds HTML code inside Java code while JSP adds Java code inside HTML.
JSP is an extension to servlet because it provides some more functionality than servlet such as expression language, custom tags, jstl etc.
A JSP page is nothing but of some HTML tags and JSP tags. In JSP page we can separate designing and development. I mean JSP separates presentation logic and business logic. Designing and updating JSP pages are very simple.
out.print("Welcome 2 java8s.com");
- JSP provides an easier way to code dynamic web pages.
- JSP does not require additional files like, java class files, web.xml etc
- Any change in the JSP code is handled by Web Container(Web server like Apache Tomcat), and doesn't require re-compilation.
- JSP pages can be directly accessed, and web.xml(deployment descriptor file) mapping is not required like in servlets.
Advantages of JSP
- Easy to maintain
- High Performance and Scalability
- Fast development
- It is platform independent.
Java Training | Python Training | Machine Learning with Python Training | Deep Learning with Python Training | Data Science with Python Training | Projects
SILAN Technology, BBSR Call to: 0674-2361252