Saturday, 7 February 2015

Jsp Introduction

Q) What is not JSP?
Ø  JSP  is not a software to be installed.
Ø  JSP is not a programming language unlike Java.

Q) What is JSP?
Ø  JSP is a Java based Web Technology.
Ø  JSP is a J2EE technology.

Q) What is the purpose of JSP technology?
Ø  JSP technology is used in Java basedweb application development.
OR
Ø  JSP technology is used in the implementation of Java based web-enabled enterpriseapplications.
OR
Ø  JSP technology is used in Java based dynamic website development.

Q)What is a  jsp?
Ø  A jsp  is a web server side pieceof  code that enhances the functionality of the web server.
Ø  A jsp is a dynamic web resourcein a Java web application.
Ø  A jsp is a web component.

Q)What can a jsp do in making a Java based website dynamic?
Ø  A jsp can perform the following tasks.
                                       I.            capturing the user input
                                    II.            communicating with the database
                                  III.            processing of data
                                 IV.            producing the response page
                                    V.            handing over the response page to the  web server

Q)What are the constituents of a jsp?
Ø  jsp=  HTML code+ Java code(directly/indirectly)

Q)Explain about the life cycle   of a jsp.
Ø  JSP container/engine controls the life of a JSP page(jsp).
Ø  Life cycle of a jsp is described by3 life cycle methods  and 6 phases.
Ø  Life cycle methods are
                                       I.            jspInit()
                                    II.            jspService(HttpServletRequest,HttpServletResponse)
                                  III.            jspDestroy()
Ø  Life cycle phases are
                                       I.            translation phase
                                    II.            compilation phase
                                  III.            instantiation phase
                                 IV.            initialization phase
                                    V.            servicing phase
                                 VI.            destruction phase

Q) Explain about translation phase of a jsp.
Ø  JSP Container converting ".jsp" fileinto ".java" file  is nothing but translationphase  of a jsp.
Ø  A jsp(JSP page) is a pure text file with any name but with  ".jsp" extension.
Ø  A jsp contains HTML code but it is not a HTML document.

Ø  A jsp  can contain Java code but it is not a Java program.

No comments:

Post a Comment