A JSP page that gets properties from a bean

By: Hisham Alssadi Emailed: 1729 times Printed: 2337 times    

Latest comments
By: rohit kumar - how this program is work
By: Kirti - Hi..thx for the hadoop in
By: Spijker - I have altered the code a
By: ali mohammed - why we use the java in ne
By: ali mohammed - why we use the java in ne
By: mizhelle - when I exported the data
By: raul - no output as well, i'm ge
By: Rajesh - thanx very much...
By: Suindu De - Suppose we are executing

<jsp:useBean id=\"bean1\" class=\"com.awl.bean1\"/>
<HTML>
<HEAD><TITLE>Beans!</TITLE></ HEAD>
<BODY BGCOLOR=\"#FFFFFF\">
<p> here is some data that came from bean1:</p>
<UL>
<LI> the name of the bean is :
<jsp:getProperty name=\"bean1\" property=\"name\"/>
<LI> the 7th prime number is:
<jsp:getProperty name=\"bean1\" property=\"sevenPrimeNumber\"/ >
<LI>the current time is :
<jsp:getProperty name=\"bean1\" property=\"currentTime\"/>
</UL>
<CENTER>
<TABLE BORDER =\"0\">
<TR>
<TD BGCOLOR=\"<jsp:getProperty name=\"bean1\" property=\"color\"/>\">
<P> the information from a bean can be used anywhere on the page!</P>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>


JSP Home | All JSP Tutorials | Latest JSP Tutorials

Sponsored Links

If this tutorial doesn't answer your question, or you have a specific question, just ask an expert here. Post your question to get a direct answer.



Bookmark and Share

Comments(0)


Be the first one to add a comment

Your name (required):


Your email(required, will not be shown to the public):


Your sites URL (optional):


Your comments:



More Tutorials by Hisham Alssadi
A JSP page that gets properties from a bean

More Tutorials in JSP
LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: `java.net.BindException: Permission denied <null>:80
JSP Alert Example
JSP CheckBox Example
Uploading an Image to a Database using JSP
Uploading a file to a server using JSP
A JSP page that gets properties from a bean
The page Directive in JSP
The taglib, tag, include, attribute and the variable Directive in JSP
Declarations in JSP
Scriptlets and Expressions in JSP
Tag Libraries in JSP
The Request Object in JSP
The Response Object in JSP
The Out Object in JSP
The Session Object in JSP

More Latest News
Most Viewed Articles (in JSP )
JSP Example to connect to MS SQL database and retrieve records
Comparison operators in JSP
JSP Alert Example
What are the different scopes in JSP?
JSP CheckBox Example
JSP Program for display Date
Sending Email using JSP
Writing your first JSP page
Example Using Initialization Parameters
LifecycleException: service.getName(): "Catalina"; Protocol handler start failed: `java.net.BindException: Permission denied <null>:80
Using a DataSource from WebLogic in a JSP
The Request Object in JSP
Steps to get a Free SSL certificate for your Tomcat
Automatically Refreshing a JSP
What is JSP?
Most Emailed Articles (in JSP)
Sending Email using JSP
The Servlet Life Cycle
Select Object
Embedding a QuickTime movie in a JSP
Embedding MP3 audio file in a JSP
Querying Data with the JSTL in JSP
Combining Scriptlets with HTML
Form processing in JSP
JSP Program for display Date
An Example Using Servlet Initialization and Page Modification Dates
WebClient: Talking to Web Servers Interactively
Checkbox Object
Handling Events
NotifyUtil::java.net.ConnectException: Connection refused: connect
Calling JSP from a batch file