MY mENU


Wednesday 21 March 2012

Jsp Interview Questions

What is JSP ? 

Java Server Pages (JSP) is a server side component for the generation of dynamic information as the response. Best suitable to implement view components (presentation layer components). It is part of SUN’s J2EE platform.



Explain the benefits of JSP?

These are some of the benefits due to the usage of JSP they are:

  •  Portability, reusability and logic components of the language can be used across various platforms. 
  • Memory and exception management. 
  • Has wide range of API which increases the output functionality.
  • Low maintenance and easy deployment. 
  • Robust performance on multiple requests.

Is JSP technology extensible?

Yes, it is. JSP technology is extensible through the development of custom actions, or tags, which are encapsulated in tag libraries.



Can we implement an interface in a JSP?
No 



Explain the differences between ASP and JSP?
The big difference between both of these technologies lies with the design of the software. JSP technology is server and platform independent whereas ASP relies primarily on Microsoft technologies.

Can I stop JSP execution while in the midst of processing a request?
Yes. Preemptive termination of request processing on an error condition is a good way to maximize the throughput of a high-volume JSP engine. The trick (assuming Java is your scripting language) is to use the return statement when we want to terminate further processing.

Explain JSP API ?

The JSP API contains only one package : javax.servlet.jsp

It contains the following 2 interfaces: 

  1. JspPage: This interface defines the two life cycle methods jspInit() and jspDestroy()
  2.  HttpJspPage:This interface defines only one life cyle method _jspService() method.

Every generated servlet for the jsp's should implement either JspPage or HttpJspPage interface either directly or indirectly.

No comments:

Post a Comment