aspose file tools*
The moose likes Struts and the fly likes still having problem with logic:iterate tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "still having problem with logic:iterate tags" Watch "still having problem with logic:iterate tags" New topic
Author

still having problem with logic:iterate tags

kay lin
Ranch Hand

Joined: May 20, 2004
Posts: 132
Hi all:
I am still having trouble with the logic:iterate tag
I posted earlier, and took the suggestion from some one on the forum, here is my newest version of the code



I put the above code in my JSP page, and when I compile it in Jbuilder, it doesn't seem to know that "InquiryDisplayBean" class exits, even though at the top of my page, i did <% import = "com.bean.InquiryDisplayBean"%>, Can some body please help me?

Actually, does anyone know is there any good examples on line that shows you how to do a drop down box using <logic:iterate> please let me know...
Many thanks
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
The correct way to import a class into a JSP is

<%@ page import="myPackage.myClass" %>
kay lin
Ranch Hand

Joined: May 20, 2004
Posts: 132
I still go the same error, here is my code


And even though i specify the class in the <%page import..%>, i still get the same error:
javax.servlet.jsp.JspException: Cannot find bean under name org.apache.struts.taglib.html.BEAN

I am REALLY CLUELESS..please help...

Many Many Thanks
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
Can you post all the code from your JSP. And please, remember to check Disable smilies in this post before you submit your reply.
[ May 21, 2004: Message edited by: Jason Menard ]
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

That kind of error could come from anywhere in that snippet.

Here is what I'd do to find the culprit:
(Make sure you copy items somewhere for safekeeping as you delete them from the jsp)
Remove the option tags - retest
if still doesn't work,
remove the logic tags - retest
if still doesn't work,
remove the select tags - retest

There's a good chance that select might be what's causing the problem.

Usually that error means that the ActionForm being referenced (in this case it defaults to the ActionForm defined in your struts-config ActionMapping because the name attribute was not specified) cannot be found.


A good workman is known by his tools.
kay lin
Ranch Hand

Joined: May 20, 2004
Posts: 132
Here is my code in the JSP page




And I don't understand How come i am getting the error...
2 things i can be sure:
the <logic:iterate> tag behaves correctly, cuz i tested them separately, also
'transaction' has been used in a previous <logic:iterate> section to loop through the collection, but I guess that doesn't matter right?

So any help is GREATLY appreciated

Thanks
Jason Menard
Sheriff

Joined: Nov 09, 2000
Posts: 6450
Sorry, also need to see the stacktrace.
kay lin
Ranch Hand

Joined: May 20, 2004
Posts: 132

There's a good chance that select might be what's causing the problem.

Usually that error means that the ActionForm being referenced (in this case it defaults to the ActionForm defined in your struts-config ActionMapping because the name attribute was not specified) cannot be found.[/QB]

YOu are RIGHT, <html:select> and <htmlption> are giving me problem, i replace those with plain <select> and <option>, it worked, and I also checked my struts-config.xml file,

here is a section of it


and the name attribute is specified, so I don't really know why it didn't work and complain that it CANNOT FIND THE BEAN...

please let me know...

All your help is greatly apprecaited
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: still having problem with logic:iterate tags