I could be wrong, but 'int' is a primitive type, I don�t know if it extends
Object, have you tried 'Integer my_object = EX.myObject' ?
Francisco
----- Original Message -----
From: "Mike Alba" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 01, 2001 7:17 PM
Subject: Re: Tomcat/JSP Question
> Actually I was wondering if you can do this
>
> Class Example
> {
>
> public Object myObject;
>
> public Example()
> {
> this.myObject = new myObject();
> } // end constructor
>
> }
>
> then acess it via my JSP
>
> <jsp:useBean id = "EX" class = "Example" scope = "session" />
> <% int my_object = EX.myObject %>
>
> It says that this doesnt exist? Is there no way
> to do this?
>
> Thanks so much for your help!
>
> Mike
>
> ----- Original Message -----
> From: "Purcell, Scott" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 01, 2001 12:47 PM
> Subject: RE: Tomcat/JSP Question
>
>
> > I think you may have the syntax for
> > jsp:get_property
> > jsp:set_property
> > wrong.
> > It is jsp:getProperty()
> > and jsp:setProperty()
> >
> > Here is a textbook example from Fields and Kolbs book. Hope it helps
> > #JSP
> >
> > <% page import = "com.taglib.wdjsp.components.CompoundIntrestBean" %>
> > <jsp:useBean id="calculator" class="CompoundInterestBean" />
> > <jsp:setProperty name="calculator" property="principal" />
> > </jsp:useBean>
> > <jsp:getProperty name="calculator" property="principal" />
> >
> > Hope that helps,
> > Scott
> >
> >
> >
> >
> > -----Original Message-----
> > From: Mike Alba [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, June 01, 2001 2:47 PM
> > To: [EMAIL PROTECTED]
> > Subject: Tomcat/JSP Question
> >
> >
> > Hi,
> >
> > Forgive me for the beginner question but I am trying to
> > instantiate a class for a JSP.
> > I am using:
> > <jsp:useBean id = "EX" class = "Example" scope = "session" />
> >
> > Thus I am under the assumption that my "Example" class is being
> > instantiated and the constructor is called, is this incorrect?
> > Basically I am trying to instantiate a class for a session and
> > was wondering if this is the way to do it.
> > And so if it is can I access class objects, I am assuming
> > I am supposed to use
> > jsp:get_property
> > jsp:set_property
> >
> > rather then EX.counter
> > where counter is a property of the "Example class"
> >
> > Once again sorry for the newbie question
> > and thanks for any help you can give!!
> >
> > Mike
> >
>
>