JSP Interview Preparation Guide Download PDF
Java JSP Programming basic and advance interview questions and answers.
26 Java JSP Programming Questions and Answers:
1 :: What is JSP technology?
Java Server Page is a standard Java extension that is defined on top of the servlet Extensions. The goal of JSP is the simplified creation and management of dynamic Web pages. JSPs are secure, platform-independent, and best of all, make use of Java as a server-side scripting language.
2 :: What is JSP page?
A JSP page is a text-based document that contains two types of text: static template data, which can be expressed in any text-based format such as HTML, SVG, WML, and XML, and JSP elements, which construct dynamic content.
3 :: What are the implicit objects in JSP?
Implicit objects are created by the web container and contain information related to a particular request, page, or application. They are request, response, pageContext, session, application, out, config, page and exception.
4 :: How many JSP scripting elements and what are they?
There are three scripting language elements:
declarations,
scriptlets,
and expressions.
declarations,
scriptlets,
and expressions.
5 :: Why are JSP pages the preferred API for creating a web-based client program?
Because no plug-ins or security policy files are needed on the client systems(applet does). Also, JSP pages enable cleaner and more module application design because they provide a way to separate applications programming from web page design. This means personnel involved in web page design do not need to understand Java programming language syntax to do their jobs.
6 :: Is JSP technology extensible?
YES. JSP technology is extensible through the development of custom actions, or tags, which are encapsulated in tag libraries.
7 :: What is the ResourceBundle class in JSP?
The ResourceBundle class is used to store locale-specific resources that can be loaded by a program to tailor the program’s appearance to the particular locale in which it is being run.
8 :: What is the difference between a Scrollbar and a ScrollPane in JSP?
A Scrollbar is a Component, but not a Container. A ScrollPane is a Container. A ScrollPane handles its own events and performs its own scrolling.
9 :: What is a Java package and how is it used?
A Java package is a naming context for classes and interfaces. A package is used to create a separate name space for groups of classes and interfaces. Packages are also used to organize related classes and interfaces into a single API unit and to control accessibility to these classes and interfaces.
10 :: What are the Object and Class classes used for?
The Object class is the highest-level class in the Java class hierarchy. The Class class is used to represent the classes and interfaces that are loaded by a Java program.