Wednesday, October 7, 2015

Practical example of external objects in JSP

Practical use of external objects in JSP: To demonstrate the use of external objects with the help of useBean, setProperty & getProperty actions, I have created a simple web application. Following diagram describes the flow of application: Description of the diagram: Source code of the application: First, the home page index.html. <b>Rectangle Home</b> <form action="rect.jsp"> […]
Read Complete Post...

Tuesday, October 6, 2015

JSP getProperty action tag

getProperty action of JSP: <jsp:getProperty /> action is used to write the value a bean property to the output stream. It is used when a property value is to be sent as response. It has following syntax: Let following be an external object in a JSP page. To write the value of mailId property of […]
Read Complete Post...

JSP useBean action tag

External objects in JSP: In a JSP page, two types of objects can be used: 1. implicit objects 2. external objects Implicit objects are Servlet & JSP API objects which are made available by default in the _jspService() method. External objects are objects of user defined or library classes which are created in the _jspService() […]
Read Complete Post...

Action tags of JSP

The Action tags of JSP: Action tags in JSP facilitate automation of common operations such as creation of objects, setting objects’ properties, writing objects’ property values to the output stream, including the contents of a component to the response of current request and forwarding request to another component etc. An action tag has following syntax: […]
Read Complete Post...

Monday, October 5, 2015

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 […]
Read Complete Post...

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 […]
Read Complete Post...

Saturday, October 3, 2015

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 […]
Read Complete Post...