because JSP internally changes in servlet and then follow servlet life cycle, so it is slower than servlet
The speed difference is not usually significant, but the slight performance advantage goes to Servlets because, JSPs get converted to Servlets before execution and since Servlets do not have this conversion phase, they are a little and I mean only slightly little faster than JSPs
Yes. All sorts of web Applications/websites can be created using JSP and Servlets
Both are similar to one another technology wise and finding out which is faster is not possible. Ideally speaking a JSP once compiled and deployed in a web server behaves like a servlet.
You cannot. You display JSP Pages using the help of Servlets. Servlets are of the background classes and you cannot display them
Yes, JSP (JavaServer Pages) and Servlets can be used together in a web application. Servlets handle the business logic and processing of requests, while JSP is used to create the user interface and generate dynamic content. Servlets can interact with JSP pages to pass data and control the flow of the application.
No. But, knowledge of Servlets would be an added advantage if you are learning JSPs
scope of operater
Depends on what you are doing, PHP does somethings Faster than JSP and in reverse.
Servlets 3.0 and JSP 2.1
JSP and servlets are used in when you are building a website that provides a server sided service, for example connecting to a database is a service. == == JSP/Servlets are java code that perform the backend operations for web pages. Such servlets run in a java container, such as JBoss or Tomcat. Where you would use these would be in a web-based environment where you wanted to run the backend on Java, as opposed to PHP, Perl, etc. As an example, eBay is run by JSP/Servlet technology. However, JSP/Servlet technology is much more complicated than scripting languages, but well worth learning.
Servlet is more faster than JSP, but JSP is more convenient than Servlet and JSP is clearly superior, shorter, simple and easier to use. JSP can be perceived as Java in HTML code. JSP require no explicit compilation as like servlets and can keep in the web application server as HTML file. The web application server in turn compile the java code in JSP and load it in its library for future execution. Servlet can be perceived as HTML in Java code. The servlet is the class file, which would be loaded in the web application server as a program. The program output will be directed to the outstream object which in turn direct to the client as HTML elements.
It is a good to know item. It is not mandatory or necessary. Basic knowledge of core Java is enough to learn JSP and Servlets.