|
INTERVIEW QUESTIONS
J2EE
JSP
DETAILS
Question: What are the implicit objects in JSP & differences between them?
Answer: There are 9 Implicit Objects defined in JSP are : application, config, exception, out, page, pageContext, request, response and session.
The main difference between these Objects lies in their scope and the data they handles.
Submitted by Sagar GV ([email protected]) _________________
JSP Implicit Objects :-
S.No Implici Object Class or Interface Description 1. application interface (javax.servlet.ServletContext) Refers to the web application's enviornment 2. session interface ((javax.servlet.http.HttpSession) Refers to the User's session 3. request interface ((javax.servlet.http.HttpServlet.Request) Refers to the current request page 4. response interface ((javax.servlet.http.HttpServlet.Response) Refers to the current response to the client 5. out Class (javax.servlet.jsp.JspWriter) Refers to the output stream for hte page 6. page Class (java.lang.Object) Refers to the page's servlet instance 7. pageContext Class (javax.servlet.jsp.PageContext) Refers to the page's enviornment 8. config Interface (javax.servlet.ServletConfig) Refers to the servlet's configuration 9. exception Class (java.lang.Throwable) Used for error handling
Submitted by Sharaj Anand ([email protected])
|
|
|
Category |
JSP Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.4) By 6952 users |
Added on |
10/14/2010 |
Views |
78517 |
Rate it! |
|
|
Question:
What are the implicit objects in JSP & differences between them?
Answer:
There are 9 Implicit Objects defined in JSP are : application, config, exception, out, page, pageContext, request, response and session.
The main difference between these Objects lies in their scope and the data they handles.
Submitted by Sagar GV ([email protected]) _________________
JSP Implicit Objects :-
S.No Implici Object Class or Interface Description 1. application interface (javax.servlet.ServletContext) Refers to the web application's enviornment 2. session interface ((javax.servlet.http.HttpSession) Refers to the User's session 3. request interface ((javax.servlet.http.HttpServlet.Request) Refers to the current request page 4. response interface ((javax.servlet.http.HttpServlet.Response) Refers to the current response to the client 5. out Class (javax.servlet.jsp.JspWriter) Refers to the output stream for hte page 6. page Class (java.lang.Object) Refers to the page's servlet instance 7. pageContext Class (javax.servlet.jsp.PageContext) Refers to the page's enviornment 8. config Interface (javax.servlet.ServletConfig) Refers to the servlet's configuration 9. exception Class (java.lang.Throwable) Used for error handling
Submitted by Sharaj Anand ([email protected]) Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What is jsp:use bean. What are the scope attributes & difference between these attributes?
|
View Answer
|
|
What is difference between scriptlet and expression?
|
View Answer
|
|
What is Declaration?
|
View Answer
|
|
How do you connect to the database from JSP?
|
View Answer
|
|
How do you call stored procedures from JSP?
|
View Answer
|
|
How do you restrict page errors display in the JSP page?
|
View Answer
|
|
How do you pass control from one JSP page to another?
|
View Answer
|
|
How do I have the JSP-generated servlet subclass my own custom servlet class, instead of the default?
|
View Answer
|
|
How does a servlet communicate with a JSP page?
|
View Answer
|
|
Is there a way I can set the inactivity lease period on a per-session basis?
|
View Answer
|
|
How can I set a cookie and delete a cookie from within a JSP page?
|
View Answer
|
|
How can I declare methods within my JSP page?
|
View Answer
|
|
How can I enable session tracking for JSP pages if the browser has disabled cookies?
|
View Answer
|
|
How do I use a scriptlet to initialize a newly instantiated bean?
|
View Answer
|
|
How does JSP handle run-time exceptions?
|
View Answer
|
|
How do I prevent the output of my JSP or Servlet pages from being cached by the browser?
|
View Answer
|
|
How do I use comments within a JSP page?
|
View Answer
|
|
Can I stop JSP execution while in the midst of processing a request?
|
View Answer
|
|
Is there a way to reference the "this" variable within a JSP page?
|
View Answer
|
|
How do I perform browser redirection from a JSP page?
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All JSP Interview Questions & Answers - Exam Mode /
Learning Mode
|