How to use beans in JSP?
Submitted by: AdministratorJava Beans are reusable components. They are used to separate Business Logic from Presentation Logic. Internally a bean is just an instance of a class. JSP’s provide three basic tags for working with Beans.
* <jsp : useBean id="bean name" class="bean class" scope= "page | request | session | application " />
bean name = the name that refers to the bean.
Bean class = name of the java class that defines the bean.
* <jsp:setProperty name = “id” property = “someProperty” value = “someValue” /
id = the name of the bean as specified in the useBean tag.
property = name of the property to be passed to the bean.
value = value of that particular property .
* <jsp:getProperty name = “id” property = “someProperty” />
Submitted by: Administrator
* <jsp : useBean id="bean name" class="bean class" scope= "page | request | session | application " />
bean name = the name that refers to the bean.
Bean class = name of the java class that defines the bean.
* <jsp:setProperty name = “id” property = “someProperty” value = “someValue” /
id = the name of the bean as specified in the useBean tag.
property = name of the property to be passed to the bean.
value = value of that particular property .
* <jsp:getProperty name = “id” property = “someProperty” />
Submitted by: Administrator
Read Online Java Technical Job Interview Questions And Answers
Top Java Technical Questions
☺ | Explain Difference between Tomcat and Weblogic server? |
☺ | Explain different Authentication Options available in Servets? |
☺ | How does the native language C or C++ understand data types in JAVA? |
☺ | What is a StringBuffer class and how does it differ from String Class? |
☺ | read a line of input at a time in Java? |
Top Java Programming Language Categories
☺ | Core Java Interview Questions. |
☺ | Hibernate Interview Questions. |
☺ | Advanced Java Interview Questions. |
☺ | IBM WebSphere Interview Questions. |
☺ | Spring Framework Interview Questions. |