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

latest 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.


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



How is scripting disabled?

Scripting is disabled by setting the scripting-invalid element of the deployment descriptor to true. It is a subelement of jsp-property-group. Its valid values are true and false. The syntax for disabling scripting is as follows:

<jsp-property-group>
   <url-pattern>*.jsp</url-pattern>
   <scripting-invalid>true</scripting-invalid>
</jsp-property-group>

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 18:22:04

What is a JSP expression?

A JSP expression is used to write an output without using the out.print statement. It can be said as a shorthand representation for scriptlets. An expression is written between the <%= and %> tags. It is not required to end the expression with a semicolon, as it implicitly adds a semicolon to all the expressions within the expression tags.

java server pages (JSP) Interview question.

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

What are JSP declarations?

As the name implies, JSP declarations are used to declare class variables and methods in a JSP page. They are initialized when the class is initialized. Anything defined in a declaration is available for the whole JSP page. A declaration block is enclosed between the <%! and %> tags. A declaration is not included in the service() method when a JSP is translated to a servlet.

java server pages (JSP) Interview question.

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

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 scripting elements?

JSP scripting elements let you insert Java code into the servlet that will be generated from the current JSP page. There are three forms:
  1. Expressions of the form <%= expression %> that are evaluated and inserted into the output,
  2. Scriptlets of the form <% code %> that are inserted into the servlet's service method,
  3. Declarations of the form <%! code %> that are inserted into the body of the servlet class, outside of any existing methods.

java server pages (JSP) Interview question.

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

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 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:getProperty action?

The <jsp:getProperty> action is used to access the properties of a bean that was set using the 
<jsp:getProperty> action. The container converts the property to a String as follows:

  1. If it is an object, it uses the toString() method to convert it to a String.
  2. If it is a primitive, it converts it directly to a String using the valueOf() method of the corresponding Wrapper class.
The syntax of the <jsp:getProperty> method is: <jsp:getProperty name="Name" property="Property" />
Here, name is the id of the bean from which the property was set. The property attribute is the property to get. A user must create or locate a bean using the <jsp:useBean> action before using the <jsp:getProperty> action.

java server pages (JSP) Interview question.

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

What is the jsp:setProperty action?

You use jsp:setProperty to give values to properties of beans that have been referenced earlier. You can do this in two contexts. First, you can use jsp:setProperty after, but outside of, a jsp:useBean element, as below:

<jsp:useBean id="myName" ... />
...
<jsp:setProperty name="myName" property="myProperty" ... />

In this case, the jsp:setProperty is executed regardless of whether a new bean was instantiated or an existing bean was found. 

A second context in which jsp:setProperty can appear is inside the body of a jsp:useBean element, as below:

<jsp:useBean id="myName" ... >
  ...
  <jsp:setProperty name="myName" 
                   property="someProperty" ... />
</jsp:useBean>

Here, the jsp:setProperty is executed only if a new object was instantiated, not if an existing one was found.

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 18:11:08

Differentiate between pageContext.include and jsp:include?

The <jsp:include> standard action and the pageContext.include() method are both used to include resources at runtime. However, the pageContext.include() method always flushes the output of the current page before including the other components, whereas <jsp:include> flushes the output of the current page only if the value of flush is explicitly set to true as follows: 

 <jsp:include page="/index.jsp" flush="true"/>  <jsp:include page="/index.jsp" flush="true"/> 

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 18:08:48

What is the difference between include directive and include action?

Include directiveInclude action
The include directive, includes the content of the specified file during the translation phase–when the page is converted to a servlet.The include action, includes the response generated by executing the specified page (a JSP page or a servlet) during the request processing phase–when the page is requested by a user.
The include directive is used to statically insert the contents of a resource into the current JSP.The include standard action enables the current JSP page to include a static or a dynamic resource at runtime.
Use the include directive if the file changes rarely. It’s the fastest mechanism.Use the include action only for content that changes often, and if which page to include cannot be decided until the main page is requested.

java server pages (JSP) Interview question.

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

What is the <jsp:include> standard action?

The <jsp:include> standard action enables the current JSP page to include a static or a dynamic resource at runtime. In contrast to the include directive, the include action is used for resources that change frequently. The resource to be included must be in the same context.The syntax of the <jsp:include> standard action is as follows:
<jsp:include page="targetPage" flush="true"/> 
Here, targetPage is the page to be included in the current JSP.

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 18:04:23

What is the <jsp:forward> standard action?

  1. The <jsp:forward> standard action forwards a response from a servlet or a JSP page to another page.
  2. The execution of the current page is stopped and control is transferred to the forwarded page.
  3. The syntax of the <jsp:forward> standard action is :  <jsp:forward page="/targetPage" />   Here, targetPage can be a JSP page, an HTML page, or a servlet within the same context.
  4. If anything is written to the output stream that is not buffered before <jsp:forward>, an IllegalStateException will be thrown.
Note : Whenever we intend to use <jsp:forward> or <jsp:include> in a page, buffering should be enabled. By default buffer is enabled.

java server pages (JSP) Interview question.

java server pages (JSP)   2013-05-12 18:03:08

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

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 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 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 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 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 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




latest 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.