GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  JSP
Go To First  |  Previous Question  |  Next Question 
 JSP  |  Question 300 of 306    Print  
What is the difference between jsp and servlet life cycles?

  
Total Answers and Comments: 2 Last Update: March 10, 2008     Asked by: Rakesh.s 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Neha
 
Servlet's life cycle start with the following steps.
servet's object is created
servlets init() method is there where the servlet is initialized it needs arguments Servlet Config's object
Servlets service() method where all work is done then
servlet's destroy() method that's the end of servlet.


where as in jsp's life cycle first .jsp is converted to .class that is servlet and then follow the same step's of servlet...that means after jsp in translated to servlet it behave in the same way as servlet.

Above answer was rated as good by the following members:
phdsong
November 18, 2007 02:13:19   #1  
Neha        

RE: What is the difference between jsp and servlet lif...
Servlet's life cycle start with the following steps.
servet's object is created
servlets init() method is there where the servlet is initialized it needs arguments Servlet Config's object
Servlets service() method where all work is done then
servlet's destroy() method that's the end of servlet.


where as in jsp's life cycle first .jsp is converted to .class that is servlet and then follow the same step's of servlet...that means after jsp in translated to servlet it behave in the same way as servlet.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
March 10, 2008 04:01:01   #2  
bharaniprasanth Member Since: February 2008   Contribution: 46    

RE: What is the difference between jsp and servlet life cycles?
Yes somebody there is correct
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    

 Related Questions

Latest Answer : It means its a static and for example page1 and page2 are web pages if that content of the page2 is include with in the page1 and the its execuited.As well as First page2 is execuited after that page1 is execuited.And ...

Latest Answer : Using a Bean in a JSP PageTo use a bean in a JSP page, three attributes must be supplied - an id, which provides a local name for the bean, the bean's class name, which is used to instantiate the bean if it does not exit, and a scope, which specifies ...

Latest Answer :  scriptelet are used to write the code in any language but that language is mentioned in page language attribute.ex://returns siva kumar expession are used to display the simple values and returning ...

How do I have the JSP-generated servlet subclass my own custom servlet class, instead of the default?
One should be very careful when having JSP pages extend custom servlet classes as opposed to the default one generated by the JSP engine. In doing so, you may lose out on any advanced optimization that 

The following code snippet shows how a servlet instantiates a bean and initializes it with FORM data posted by a browser. The bean is then placed into the request, and the call is then forwarded to the 
Latest Answer : Hi Jose Kutty,Mr. Nanda is wrong. We can create RequestDespatcher object by two ways, either  by ServletRequest object       request.getRequestDispatcher("/abc.jsp");// here you need to mention relative path(or) ...

Typically, a default inactivity lease period for all sessions is set within your JSPengine admin screen or associated properties file. However, if your JSP engine supports the Servlet 2.1 API, you can 

We know that session tracking uses cookies by default to associate a session identifier with a unique user. If the browser does not support cookies, or if cookies are disabled, you can still enable session 

You will need to set the appropriate HTTP header attributes to prevent the dynamic content output by the JSP page from being cached by the browser. Just execute the following scriptlet at the beginning 

Yes, there is. Under JSP 1.0, the page implicit object is equivalent to "this", and returns a reference to the servlet generated by the JSP page. 

You can use the response implicit object to redirect the browser to a different resource, as:response.sendRedirect("http://www.exforsys.com/path/error.html");You can also physically alter the 


 Sponsored Links

 
Related Articles

What is difference between call by value and call by reference in function?

The arguments passed to function can be of two types 1. Values passed 2. Address passed The first type refers to call by value and the second type refers to call by reference. For instance consider program1 main() { int x=50, y=70; interchange(x,y); printf(“x=%d y=%d”,x,
 

What is Systems Development Life Cycle

Introduction Developers worldwide will agree that building software takes more than just writing complex codes and implementing them in an environment. Developers usually start out their career in programming by developing programs or software according to their own plan and hope that someone will
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

What is Software Development Life Cycle?

What is Software Development Life Cycle? In this chapter we’ll be looking on SDLC as a tool for development, what are the factors for its proper implementation and special section on software security from the point of view of SDLC. These topics will guide us in knowing the important of S
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

Why Improving Your Vocabulary Can Enhance Your Life

Why Improving Your Vocabulary Can Enhance Your Life There are a number of reasons why you will want to improve your vocabulary You will feel good about yourself because you will have a larger command of your language It has also been shown that improving your vocabulary can greatly increase your IQ
 

Difference between Scholarship and Grant

Difference between Scholarship and Grant While both scholarships and grants allow students to pay for their tuition without having to pay the money back there are a number of key differences between the two Knowing the difference between grants and scholarship will make it much easier for students t
 

HR Interview - HR Interview Mistakes You Will Want To Avoid

HR Interview Mistakes You Will Want To Avoid The job interview can be a stressful process This is especially true for those who are going after a competitive position Your nonverbal communication combined with the answers you give during the interview will determine if you are hired mosgoogle While
 

HR Interview - Behavioral HR Interviews

Behavioral HR Interviews As the name implies a behavioral interview is an interview that is held by a human resources department to determine if an applicant has the behaviors that are appropriate for a job The company must know how an applicant will behave in a certain situations mosgoogle The logi
 

Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape