JSP is slower than Servlet. JSP is slower than Servlet because it must first be translated into Java code before it can be compiled. Modification in Servlet takes a long time because it requires reloading, recompiling, and restarting the server every time we make a change in our code.
The JSP engine converts the servlet into an executable class and sends the request to the servlet engine. The servlet engine is a component of the web server that loads and executes the Servlet class. During running, the servlet generates an HTML output.
The JSPs can only be called from the Controller servlet.
Figure 3 depicts the Model 2 architecture, which combines the use of servlets and JSP pages. JSP pages are utilised for the presentation layer, whereas servlets are used for processing duties in this mode. The servlet serves as a controller, handling requests and generating any beans required by the JSP page.
JSP is slower than Servlet. Because the initial stage in the JSP lifecycle is to translate JSP to Java code and then compile, JSP is slower than Servlet. All protocol requests are accepted by Servlet. Only http requests are accepted by JSP.
Share With Friend
Have a friend to whom you would want to share this course?
Download LearnVern App
Code Scan
or
Download the app
598K+
Downloads
4.57
Avg. Ratings
15K+
Reviews
Learn anywhere on the go
Get regular updates about your enrolled or new courses
Share content with your friends
Evaluate your progress through practice tests
No internet connection needed
Enroll for the webinar and join at the time of the webinar from anywhere
Enjoying this course!
All the Courses on Learnvern are Free! So Register/Sign in to
have Access all the Courses and Videos.