The Complete Project Source Code Platform

Kashipara.com is a community of ONE million programmers and students, Just like you, Helping each other.Join them. It only takes a minute: Sign Up

Job Resume Template

hot java server pages (JSP) Job Interview Questions And Answers


Why don't preparation your interviews. Best and top asking questions java server pages (JSP) questions and answers. Prepare your job java server pages (JSP) interview with us. Most frequently asked questions in java server pages (JSP) interview. Top 10 most common java server pages (JSP) interview questions and answer to ask. java server pages (JSP) most popular interview question for fresher and experiences. We have good collection of java server pages (JSP) job interview questions and answers. Ask interview questions and answers mnc company.employee ,fresher and student. java server pages (JSP) technical questions asking in interview. Complete placement preparation for major companies tests and java server pages (JSP) interviews,Aptitude questions and answers, technical, interview tips, practice tests, assessment tests and general knowledge questions and answers.


Free Download java server pages (JSP) Questions And Answers Pdf.


hot java server pages (JSP) FAQ java server pages (JSP) Interview Questions and Answers for Experiences and Freshers.



What are the advantages of JSP over Servlet?

JSP is a serverside technology to make content generation a simple appear.The advantage of JSP is that they are document-centric. Servlets, on the other hand, look and act like programs. A Java Server Page can contain Java program fragments that instantiate and execute Java classes, but these occur inside an HTML template file and are primarily used to generate dynamic content. Some of the JSP functionality can be achieved on the client, using JavaScript. The power of JSP is that it is server-based and provides a framework for Web application development.

java server pages (JSP)   2013-05-12 16:43:18

What is the life-cycle of JSP?

When a request is mapped to a JSP page for the first time, it translates the JSP page into a servlet class and compiles the class. It is this servlet that services the client requests.A JSP page has seven phases in its lifecycle, as listed below in the sequence of occurrence:

  1. Translation
  2. Compilation
  3. Loading the class
  4. Instantiating the class
  5. jspInit() invocation
  6. _jspService() invocation
  7. jspDestroy() invocation

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 16:46:38

What is the jspInit() method?

The jspInit() method of the javax.servlet.jsp.JspPage interface is similar to the init() method of servlets. This method is invoked by the container only once when a JSP page is initialized. It can be overridden by a page author to initialize resources such as database and network connections, and to allow a JSP page to read persistent configuration data.

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 16:48:02

What is the _jspService() method?

SThe _jspService() method of the javax.servlet.jsp.HttpJspPage interface is invoked every time a new request comes to a JSP page. This method takes the HttpServletRequest and HttpServletResponse objects as its arguments. A page author cannot override this method, as its implementation is provided by the container.

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 16:49:46

What is the jspDestroy() method?

The jspDestroy() method of the javax.servlet.jsp.JspPage interface is invoked by the container when a JSP page is about to be destroyed. This method is similar to the destroy() method of servlets. It can be overridden by a page author to perform any cleanup operation such as closing a database connection.

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 16:53:43

What JSP lifecycle methods can I override?

You cannot override the _jspService() method within a JSP page. You can however, override the jspInit() and jspDestroy() methods within a JSP page. jspInit() can be useful for allocating resources like database connections, network connections, and so forth for the JSP page. It is good programming practice to free any allocated resources within jspDestroy().

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 17:13:33

How can I override the jspInit() and jspDestroy() methods within a JSP page?

The jspInit() and jspDestroy() methods are each executed just once during the lifecycle of a JSP page and are typically declared as JSP declarations:The jspInit() and jspDestroy() methods are each executed just once during the lifecycle of a JSP page and are typically declared as JSP declarations:

<%! 
public void jspInit() {
. . .
}
%>
<%!
public void jspDestroy() {
. . .
}
%>

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 17:24:19

What are the different types of JSP tags?

Differnt types of tags in jsp:
  1. Directive tag <%@ />
  2. Expression tag<%=%>
  3. Declaration tag<%!%>
  4. Scriptlet<%%>

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 17:31:36

What is the <jsp:useBean> standard action?

The <jsp:useBean> standard action is used to locate an existing JavaBean or to create a JavaBean if it does not exist. It has attributes to identify the object instance, to specify the lifetime of the bean, and to specify the fully qualified classpath and type.

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 17:57:48

What are implicit objects in JSP?

Implicit objects in JSP are the Java objects that the JSP Container makes available to developers in each page. These objects need not be declared or instantiated by the JSP author. They are automatically instantiated by the container and are accessed using standard variables; hence, they are called implicit objects.The implicit objects available in JSP are as follows:

  1. request
  2. response
  3. pageContext
  4. session
  5. application
  6. out
  7. config
  8. page
  9. exception
The implicit objects are parsed by the container and inserted into the generated servlet code. They are available only within the jspService method and not in any declaration.

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 17:27:34

What are JSP directives?

  • JSP directives are messages for the JSP engine. i.e., JSP directives serve as a message from a JSP page to the JSP container and control the processing of the entire page
  • They are used to set global values such as a class declaration, method implementation, output content type, etc.
  • They do not produce any output to the client.
  • Directives are always enclosed within <%@ ….. %> tag.
  • Ex: page directive, include directive, etc.

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 17:28:45

What is page directive?

  1. A page directive is to inform the JSP engine about the headers or facilities that page should get from the environment.
  2. Typically, the page directive is found at the top of almost all of our JSP pages.
  3. There can be any number of page directives within a JSP page (although the attribute – value pair must be unique).
  4. The syntax of the include directive is: <%@ page attribute="value">
  5. Example:<%@ include file="header.jsp" %>

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 17:33:38

What are the attributes of page directive?

There are thirteen attributes defined for a page directive of which the important attributes are as follows:

  1. autoFlush : It empty the buffer.
  2. buffer: It sets the buffer size. By default the buffer size is 8kb. 
  3. contentType : It tells which 
  4. errorPage: It tells which page will handle the exception if arises. 
  5. import: In this we tells the container which package of file needs to be imported.
  6. info: If we have to send some information with the jsp page. 
  7. language: By default it is java.
  8. session: In this we tells the container if we want the session or not. By default it is true. 

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 17:37:45

What is the include directive?

  1. The include directive is used to statically insert the contents of a resource into the current JSP.
  2. This enables a user to reuse the code without duplicating it, and includes the contents of the specified file at the translation time.
  3. The syntax of the include directive is as follows:
  4. <%@ include file = "FileName" %>
  5. This directive has only one attribute called file that specifies the name of the file to be included.

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 17:45:31

What is the <jsp:param> standard action?

The <jsp:param> standard action is used with <jsp:include> or <jsp:forward> to pass parameter names and values to the target resource. The syntax of the <jsp:param> standard action is as follows: 

<jsp:param name="paramName" value="paramValue"/>

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 18:13:50

What is the jsp:plugin action ?

This action lets you insert the browser-specific OBJECT or EMBED element needed to specify that the browser run an applet using the Java plugin

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 18:14:27

What is a scriptlet?

A scriptlet contains Java code that is executed every time a JSP is invoked. When a JSP is translated to a servlet, the scriptlet code goes into the service() method. Hence, methods and variables written in scriptlets are local to the service() method. A scriptlet is written between the <% and %> tags and is executed by the container at request processing time.

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 18:16:14

What are the JSP standard actions?

  1. The JSP standard actions affect the overall runtime behavior of a JSP page and also the response sent back to the client.
  2. They can be used to include a file at the request time, to find or instantiate a JavaBean, to forward a request to a new page, to generate a browser-specific code, etc.
  3. Ex: include, forward, useBean,etc. object

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 17:48:28

What are the standard actions available in JSP?

The standard actions available in JSP are as follows:
  1. <jsp:include>: It includes a response from a servlet or a JSP page into the current page. It differs from an include directive in that it includes a resource at request processing time, whereas the include directive includes a resource at translation time.
  2. <jsp:forward>: It forwards a response from a servlet or a JSP page to another page.
  3. <jsp:useBean>: It makes a JavaBean available to a page and instantiates the bean.
  4. <jsp:setProperty>: It sets the properties for a JavaBean.
  5. <jsp:getProperty>: It gets the value of a property from a JavaBean component and adds it to the response.
  6. <jsp:param>: It is used in conjunction with <jsp:forward>;, <jsp:, or plugin>; to add a parameter to a request. These parameters are provided using the name-value pairs.
  7. <jsp:plugin>: It is used to include a Java applet or a JavaBean in the current JSP page.

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 17:56:53

What are the scopes available in <jsp:useBean>?

The scopes available in <jsp:useBean> are as follows:

  1. page scope:: It specifies that the object will be available for the entire JSP page but not outside the page.
  2. request scope: It specifies that the object will be associated with a particular request and exist as long as the request exists.
  3. application scope: It specifies that the object will be available throughout the entire Web application but not outside the application.
  4. session scope: It specifies that the object will be available throughout the session with a particular client.

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 18:00:25




hot java server pages (JSP) questions and answers for experienced


java server pages (JSP) best Interview Questions have been designed especially to get you acquainted with the nature of questions you may encounter during your interview for the subject of java server pages (JSP) Programming Language. here some questions that helpful for your interview. java server pages (JSP) 2024 job interview questions with answers. java server pages (JSP) for employee and fresher. Here we present some more challenging practice java server pages (JSP) interview questions and answers that were asked in a real interview for a java server pages (JSP) developer position. These questions are really good to not just test your java server pages (JSP) skills, but also your general development knowledge. java server pages (JSP) programming learning. we hope this java server pages (JSP) interview questions and answers would be useful for quick glance before going for any java server pages (JSP) job interview.