JSP

Introduction to JSP

Limitations of servlet: Servlet as web application development technology has following drawbacks: 1. Developing web applications using servlet is unproductive i.e. a lot of code need to written even for simple tasks. 2. A servlet is responsible for dynamic content generation as well as presentation. This intermixing of dynamic content generation logic with the presentation […]


understanding JSP life cycle

The JSP life cycle: JSP life cycle is defined by JspPage and HttpJspPage interfaces. Similar to servlet, JSP life cycle has three methods: jspInit(), jspDestroy() and _jspService() . javax.servlet.jsp package contains classes and interface of JSP API. Main classes and interfaces of the JSP API are: JspPage: It extends Servlet interface and provides following JSP […]


scriptlet tag of jsp

The scriptlet tag of JSP: Scriptlet is the main tag of JSP. It is used to add request processing logic to a JSP page. A JSP page may contain any number of scriptlet tags. It has following syntax: At the time of translation, contents of the scriptlet tags are copied as it is to the […]


declaration tag of jsp

The declaration tag of JSP: declaration tag in JSP facilitate data members and methods definition in the auto generated servlet. Main use of this tag is the overriding of jspInit() and jspDestroy() methods. You have been told that for each JSP a servlet is auto generated at the time of translation. If this class was […]


Expression tag of JSP

The expression tag of JSP: Expression tag in JSP has two use. 1. It is used to write the value of an expression to the output stream i.e. It provides a short hand mechanism of evaluating expressions and writing their values to the response. 2. It is used to assign the value of variables and […]