Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9177923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:26:15+00:00 2026-06-17T17:26:15+00:00

If JSP turns into a Servlet why there are different life cycle methods for

  • 0

If JSP turns into a Servlet why there are different life cycle methods for example jspInit() and init() ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T17:26:16+00:00Added an answer on June 17, 2026 at 5:26 pm

    I’ll try to explain it correctly in the most simple way (as addition to the correct @Nathan Hughes answer) :

    From the perspective of HTML vs JAVA code, servlet is more like HTML wrapped with JAVA. It gives a strong support for handling application layer in the multilayered architecture. On the other hand JSPs were created to support the creating of presentation layer. The init() method of a servlet is called only once during initialization of the servlet.

    So the first point : Servlets were here before JSPs.

    Now to JSPs. Again from the perspective of HTML and JAVA, JSP is more like JAVA wrapped with HTML.

    WEB CONTAINER performs a translation of the JSP “source code” to the equivalent Servlet java code. This translated java Servlet source code is then compiled and the WEB CONTAINER handles the realisation of the Servlet. Simply:

    MyPage.jsp –> (translate) –> MyPage_jsp.java –> (compile) –> MyPage_jsp.class –> (load) –> Java Servlet

    The jspInit() method is called by WEB CONTAINER as a part of the initialization phase of the JSP lifecycle.

    So to your question : jspInit() not equals init().

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In JSP, I notice that I can't render ${} into HTML. After the page
The problem : My index.jsp with web.xml keeps going into HTTP 404 and 500
I have a JSP page where there is a row of buttons in their
I have a simple (Servlet, JSP, and JSTL) web app whose main functionality is
In JSP how do I get parameters from the URL? For example I have
I have a JSP page (page1.jsp) showing a data table. There are also buttons
Are jsp PageContext objects created and destroyed as part of the http request-response cycle
A jsp page in which dynamic datas are there. I want to get the
In JSP using tomcat I can specify a directory to go to a servlet
My JSP page has many Submit buttons for example <input type=submit name=RemoveCustomer value=Submit/> <input

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.