Java Server Pages (JSP) Interview Questions And Answers

JavaServer Pages (JSP) technology enables Web developers and designers to rapidly develop and easily maintain, information-rich, dynamic Web pages that leverage existing business systems. As part of the Java technology family, JSP technology enables rapid development of Web-based applications that are platform independent. JSP technology separates the user interface from content generation, enabling designers to change the overall page layout without altering the underlying dynamic content.

Benefits for Developers

If you are a Web page developer or designer who is familiar with HTML, you can:

Use JSP technology without having to learn the Java language: You can use JSP technology without learning how to write Java scriplets. Although scriptlets are no longer required to generate dynamic content, they are still supported to provide backward compatibility.

Extend the JSP language: Java tag library developers and designers can extend the JSP language with "simple tag handlers," which utilize a new, much simpler and cleaner, tag extension API. This spurs the growing number of pluggable, reusable tag libraries available, which in turn reduces the amount of code needed to write powerful Web applications.

Easily write and maintain pages: The JavaServer Pages Standard Tag Library (JSTL) expression language is now integrated into JSP technology and has been upgraded to support functions. The expression language can now be used instead of scriptlet expressions.



<< Previous                Next >>

 

41. How many JSP scripting elements are there and what are they?

There are three scripting language elements: declarations scriptlets expressions


42. How to pass information from JSP to included JSP?

Using The is used for including non-JSP files.


43. How you will display validation fail errors on jsp page?

The following tag displays all the errors:


44. Is HTML page a web component?

No. Static HTML pages and applets are bundled with web components during application assembly, but are not considered web components by the J2EE specification. Even the serverAnswer:side utility classes are not considered web components, either.


45. Is Sun providing a reference implementation for the JSP specification?

The GlassFish project is Sun's free, open-source Java EE 5 implementation. It includes an implementation of JSP technology version 2.1. You can download GlassFish builds from https://glassfish.dev.java.net/.


Your Ad Here

46. Is there a way to execute a JSP from the comandline or from my own application?

There is a little tool called JSPExecutor that allows you to do just that. The developers (Hendrik Schreiber & Peter Rossbach ) aim was not to write a full blown servlet engine, but to provide means to use JSP for generating source code or reports. Therefore most HTTP-specific features (headers, sessions, etc) are not implemented, i.e. no reponseline or header is generated. Nevertheless you can use it to precompile JSP for your website.


47. Is there a way to reference the "this" variable within a JSP page?

Yes, there is. Under JSP 1.0, the page implicit object is equivalent to "this", and returns a reference to the servlet generated by the JSP page.


48. What are all the different scope values for the tag?

tag is used to use any java object in the jsp page. Here are the scope values for tag: a) page b) request c) session and d) application


49. What are implicit Objects available to the JSP Page?

Implicit objects are the objects available to the JSP page. These objects are created by Web container and contain information related to a particular request, page, or application. The JSP implicit objects are: Variable Class Description application javax.servlet.ServletContext The context for the JSP page's servlet and any Web components contained in the same application. config javax.servlet.ServletConfig Initialization information for the JSP page's servlet. exception java.lang.Throwable Accessible only from an error page. out javax.servlet.jsp.JspWriter The output stream. page java.lang.Object The instance of the JSP page's servlet processing the current request. Not typically used by JSP page authors. pageContext javax.servlet.jsp.PageContext The context for the JSP page. Provides a single API to manage the various scoped attributes. request Subtype of javax.servlet.ServletRequest The request triggering the execution of the JSP page. response Subtype of javax.servlet.ServletResponse The response to be returned to the client. Not typically used by JSP page authors. session javax.servlet.http.HttpSession The session object for the client.


50. What are implicit objects? List them?

Certain objects that are available for the use in JSP documents without being declared first. These objects are parsed by the JSP engine and inserted into the generated servlet. The implicit objects re listed below request response pageContext session application out config page exception


Your Ad Here

<< Previous                Next >>

 
Databases Questions and Answers
 
DB2 Interview Questions and Answers
IMS Interview Questions and Answers
MYSQL Interview Questions and Answers
Oracle Interview Questions and Answers
PL/SQL Interview Questions And Answers
Quel Interview Questions and Answers
SQL Interview Questions and Answers

 
 
.NET Interview Questions and Answers
 
ASP Interview Questions and Answers
C# Interview Questions and Answers
Visual Basic Interview Questions and Answers
 
J2EE Interview Questions and Answers
 
Enterprise Java Beans (EJB) Interview Questions And Answers
Hibernate Interview Questions And Answers
Jave Messaging Service (JMS) Interview Questions And Answers
Jave Server Faces (JSF) Interview Questions And Answers
Java Server Pages (JSP) Interview Questions And Answers
Servlets Interview Questions And Answers
Spring Framework Interview Questions And Answers
Struts Framework Interview Questions And Answers
 
JAVA Interview Questions and Answers
 
Core Java Interview Questions and Answers
Java Platform, Micro Edition (Java ME) Interview Questions And Answers
JAVA GUI Interview Questions and Answers
Java Performance Tuning Interview Questions And Answers
JUnit Interview Questions And Answers
Remote Method Invocation (RMI) Interview Questions And Answers
Unified Modeling Language (UML) Interview Questions And Answers
 
Java Application Server Interview Questions And Answers
 
Tomcat Application Server Interview Questions And Answers
WebLogic Application Server Interview Questions And Answers
 
Mainframe Interview Questions and Answers
 
CICS Interview Questions and Answers
COBOL Interview Questions and Answers
IMS Interview Questions and Answers
JCL Interview Questions and Answers
REXX Interview Questions and Answers
TELON Interview Questions and Answers
VSAM Interview Questions and Answers
 
Object Oriented Language Questions and Answers
 
C Interview Questions and Answers
C++ Interview Questions and Answers
Eiffel Interview Questions and Answers
J2EE Interview Questions and Answers
JAVA Interview Questions and Answers
Sather Interview Questions and Answers
Small talk Interview Questions and Answers
 
Operation Systems Interview Questions and Answers
 
MS DOS Interview Questions and Answers
Unix OS Interview Questions and Answers
Windows Interview Questions and Answers
 
Scripting languages Interview Questions and Answers
 
Java Script Interview Questions and Answers
Practical Extraction and Reporting Language Interview Questions and Answers
PHP Interview Questions and Answers
VBScript Interview Questions and Answers
 
UserInterfaces Questions and Answers
 
Foxit Interview Questions and Answers
Glade Interview Questions and Answers
Tweak Interview Questions and Answers
 
WEB Technologies Questions and Answers
 
AJAX Interview Questions and Answers
HTML Interview Questions and Answers
WML Interview Questions and Answers
XML Interview Questions and Answers
 
Interview Tips And Some Common Questions
 
Behavioral Interview Questions And Answers


Your Ad Here