The problem has been identified and successfully solved :-).
You haven't closed the jsp tags with the /.
The correct code has been given below :
<html>
<body>
 <jsp:useBean id="circle1" class="hellobean.Circle" />
 <jsp:setProperty name="circle1" property="radius" value="2" />

 Area = <jsp:getProperty name="circle1" property="area" />
 </body>
 </html>
Also in your code you are setting the value for the redius property but
retrieving the value of the area property. Therefore the default value of
0.0 is returned when you run the above code.
Sometimes its better to run your code in another browser and see if it
throws any error messages. In your case netscape did just that.
Just a piece of advice.
Have a nice day.
With regards,
Sachin S. Khanna.
www.emailanorder.com

----- Original Message -----
From: cupid1 <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 16, 2001 10:05 PM
Subject: Re: jsp and bean on javawebserver2.0 not working


> Sachin,
>
> I tried with id attribute too but no success. Thnx for the response
though.
>
> shuaib.
>
> ----- Original Message -----
> From: "Sachin S. Khanna" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, March 16, 2001 5:15 AM
> Subject: Re: jsp and bean on javawebserver2.0 not working
>
>
> > The useBean attribute has an id attribute and not name as your code
> reveals.
> > Have a nice day.
> > With regards,
> > Sachin S. Khanna.
> > www.emailanorder.com
> >
> > ----- Original Message -----
> > From: cupid1 <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, March 16, 2001 1:32 AM
> > Subject: jsp and bean on javawebserver2.0 not working
> >
> >
> > > Hello all,
> > >
> > > A basic question. I have a sample jsp and a bean. When I try to test
it
> i
> > > get "page cannot be displayed" message in IE. Here is my source code
for
> > jsp
> > > file:
> > >
> > > <html>
> > > <body>
> > > <jsp:useBean name="circle1" class="hellobean.Circle">
> > > <jsp:setProperty name="circle1" property="radius" value="2">
> > >
> > > Area = <jsp:getProperty name="circle1" property="area">
> > > </body>
> > > </html>
> > >
> > > The jsp file is stored in oublic_html folder in Javawebserver2.0.
> > >
> > >
> > >
> > > Here is the Circle bean source code:
> > >
> > > package hellobean;
> > >
> > > public class Circle
> > > {
> > > double radius;
> > > double area;
> > >
> > > public void setRadius(double r)
> > > {
> > > radius= r;
> > > }
> > >
> > > public double getRadius()
> > > {
> > > return radius;
> > > }
> > >
> > > public void setArea(double a)
> > > {
> > > area= a;
> > > }
> > >
> > > public double getArea()
> > > {
> > > return area;
> > > }
> > >
> > >
> > > }
> > >
> > > The Circle.class file has been stored as
> > > c:\javawebserver2.0\classes\hellobean\Circle.class.
> > > My classpath contains this command: c:\javawebserver2.0\classes. Can
any
> > one
> > > please tell me what am i doing wrong? Thanks.
> > >
> > > shuaib
> > >
> > >
> >
>
===========================================================================
> > > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> > JSP-INTEREST".
> > > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> > DIGEST".
> > > Some relevant FAQs on JSP/Servlets can be found at:
> > >
> > >  http://java.sun.com/products/jsp/faq.html
> > >  http://www.esperanto.org.nz/jsp/jspfaq.html
> > >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> > >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
> > >
> >
> >
>
===========================================================================
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
> DIGEST".
> > Some relevant FAQs on JSP/Servlets can be found at:
> >
> >  http://java.sun.com/products/jsp/faq.html
> >  http://www.esperanto.org.nz/jsp/jspfaq.html
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> >  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to