Home | About Us | Contact Us | Terms Of Use
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.
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/.
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