• +91 9723535972
  • info@interviewmaterial.com

JSP Interview Questions and Answers

JSP Interview Questions and Answers

Question - 111 : - Explain jsp:plugin action.

Answer - 111 : -

This action helps in insertion of a specific object in the browser or embed the element needed to specify the running of applet using Java plugin.

Question - 112 : - Explain client and server side validation.

Answer - 112 : -

Javascript is used for the client-side validation. It takes place within the browser. Javascript is used to submit the form data if validation is successful. Validation errors require no extra network trip because form cannot be submitted.

Validation is also carried out in the server after submission. If validation fails, extra network trip is required to resend the form to the client.

Question - 113 : -
What is Translation Phase?

Answer - 113 : -

JSP engine translates and compiles a JSP file to a servlet. This servlet moves to the execution phase where requests and responses are handled. They are compiled for the first time they are accessed unless manually compiled ahead of time. The manual or explicit compilation is useful for long and convoluted programs.

Question - 114 : - Give uses of Object Cloning.

Answer - 114 : -

Object cloning is used to create an exact copy of an object by typing the same code or using various other techniques.

Question - 115 : - How can you avoid scriptlet code in JSP?

Answer - 115 : -

JavaBeans or Custom Tags can be used instead of scriptlet code.

Question - 116 : - Explain the jspDestroy() method.

Answer - 116 : -

Whenever a JSP page is about to be destroyed, the container invokes the jspDestroy() method from the javax.servlet.jsp.JspPage interface. Servlets destroy methods are similar to it. It can be easily overridden to perform cleanup, like when closing a database connection.

Question - 117 : - Explain the action.

Answer - 117 : -

It is an action used with include or forward standard actions. It helps in passing the parameter names and values to a resource.

Question - 118 : - Explain static method.

Answer - 118 : -

A static method is of the class and not the object of a class. It can be invoked without instance of a class. Static members can also access the static data and change its value.

Question - 119 : - How to disable scripting?

Answer - 119 : -

Scripting can be easily disabled by setting scripting-invalid element of the deployment descriptor to true. It is a sub-element of property group. Its can be false as well.


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners