|
HI prem...
I am also
new to this area.
I am
sending one simple example of accessing beans inside JSP.
ok.
<%@ page import = "project.first" %> <jsp:useBean
id="first" class="project.first" scope="session"/>
<jsp:setProperty name="first" property="*"/> <html>
<head><title>My First Java Bean</title></head> <body bgcolor="red"> <font size=6> <% if
(first.getName() == null) { %>
Hello Prem !!!! <% } else {%> <%= "Hello"+first.getName() %> <% } %> </font> </body> </html> This is a sample
progam!!
This is one of the ways and
this can be written in any other way also.
In this program the
fisrt.java need to have a getName() function which returns a
String.
This is working fine on my
PC. So try it out......
- Surya.
|
Title: RE: Another newbie question
- Fw: Re: Another newbie quest... Barry Scott
- Fw: Re: Another newbie ... Rick L Sample
- Re: Fw: Re: Another newbie q... Nanduri Amarnath
- Fw: Another newbie question Barry Scott
- Re: Fw: Re: Another new... L-Soft list server at Sun Microsystems (1.8d)
- Re: Another newbie question L-Soft list server at Sun Microsystems (1.8d)
- Re: Another newbie question L-Soft list server at Sun Microsystems (1.8d)
- Re: Another newbie question L-Soft list server at Sun Microsystems (1.8d)
- Re: Another newbie question Prem kumar K P
- Re: Another newbie ques... George Chen
- Another newbie question Siva Surya Kumar V
- Another newbie question Rick L Sample
- Re: Another newbie ques... AndySoft
