Category: JSP


JSP jsp:setProperty Tag

JSP jsp:setProperty Tag The setProperty tag is used to store data in JavaBeans instances. The syntax of setProperty tag is: <jsp:setProperty name=”beanName” property=”*”> <!– or –> <jsp:setProperty name=”beanName” property=”propertyName”> <!– or –> <jsp:setProperty name=”beanName” property=”propertyName” param=”parameterName”> <!– or –> <jsp:setProperty name=”beanName” property=”propertyName” value=”propertyValue”> The name attribute specifies the name of javaBean instances. This must match the id attribute specified in the jsp:useBeantag. […]


JSP jsp:getProperty Tag

JSP jsp:getProperty Tag The getProperty tag is used to retrieve a property from a JavaBeans instance. The syntax of the getProperty tag is as follows: <jsp:getProperty name=”beanName” property=”propertyName” /> The name attribute represents the name of the JavaBean instance. The property attribute represents the property of the JavaBean whose value we want to get. Example of getProperty with Java Bean Following […]


JSP jsp:useBean Tag

JSP jsp:useBean Tag If you want to interact with a JavaBeans component using the Action tag in a JSP page, you must first declare a bean. The <jsp:useBean> is a way of declaring and initializing the actual bean object. By bean we mean JavaBean component object. Syntax of <jsp:useBean> tag <jsp:useBean id = “beanName” class = “className” scope = “page | request | […]


JSP JavaBean Components

JSP JavaBean Components A JavaBeans component is a Java class with the following features: A no-argument constructor. Properties defined with accessors and mutators(getter and setter method). Class must not define any public instance variables. The class must implement the interface. Example of a JavaBean Let’s take a simple Java code example to understand what do we […]


JSP Standard Tag(Action Element)

JSP Standard Tag(Action Element) JSP specification provides Standard(Action) tags for use within your JSP pages. These tags are used to remove or eliminate scriptlet code from your JSP page because scriplet code are technically not recommended nowadays. It’s considered to be bad practice to put java code directly inside your JSP page. Standard tags begin with […]

Back To Top