I tried adding:

<bean:define id="task" type="com.razorfront.corporate.task.Task"/>

any got:

java.lang.NullPointerException  at
java.util.Hashtable.get(Hashtable.java:320)

Any other suggestions?

Aaron

-----Original Message-----
From: Keith Bacon [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 07, 2001 1:10 AM
To: [EMAIL PROTECTED]
Subject: RE: Examples anyone?


Maybe you need to use the struts tag 
<bean:define

not 
<jsp:useBean

Keith,

 
--- Aaron O'Hara <[EMAIL PROTECTED]> wrote:
> If I take out the useBean for task I get the following error:
> 
> javax.servlet.ServletException: Cannot find bean task in scope null
> 
> Any suggestions?
> 
> Aaron
> 
> -----Original Message-----
> From: Bill Clinton [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 06, 2001 2:53 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Examples anyone?
> 
> 
> Aaron,
>       I believe the code you have should be accurate, but leave out
> the 
> usebean directive for task (which isn't necessary and I think is 
> interfering with your iteration id because it has the same id):
> 
> <jsp:useBean id="general" scope="application"
> class="com.razorfront.corporate.global.General"/> 
> 
> <logic:iterate id="task" name="general" property="tasks">
>   <bean:write name="task" property="subject"/> <br>
> </logic:iterate>
> 
> this is assuming:
> 1) the method in General that returns the Arraylist is getTasks().
> 2) there is a method in Task called getSubject()
> 
> Hope that helps,
> Bill
> 
> 
> 
> Aaron O'Hara wrote:
> 
> >All,
> >
> >Would somebody be able to point me to an example of iteration with
> the
> >following environmental "restrictions"?  I've looked at sample
> code, but
> >nothing seems to meet 100% what I'm trying to do and I'm still
> tearing my
> >head out trying get get it to work.
> >
> >I have an application scope bean with a getMethod() that returns a
> List
> >which is actually an ArrayList of "Task" objects.  I want to
> iterate
> through
> >this List and display properties of the Task object using the
> getter
> >methods.
> >
> >In an unsuccessful attempt, I've tried:
> >
> ><jsp:useBean id="general" scope="application"
> >class="com.razorfront.corporate.global.General"/>
> ><jsp:useBean id="task" scope="page"
> >class="com.razorfront.corporate.task.Task"/>
> >
> ><logic:iterate id="task" name="general" property="tasks">
> >  <bean:write name="task" property="subject"/> <br>
> ></logic:iterate>
> >
> >(I've omitted the taglib statements for brevity)
> >
> >I've seen examples using HaspMaps and Lists of numbers, but not a
> List of
> >Objects.  Any assistance would be greatly appreciated!
> >
> >Aaron
> >
> >.
> >
> 


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

Reply via email to