I have tried this in my JSP but get these errors.
I have an import of java.util.* at top of the JSP.
I am using a HashSet so that items in dd box are unique.
Any help is appreciated!!!!Graham

[Default] JBoss 2.2.2 Started in 0m:26s
2001-09-17 03:11:55 - Ctx( /adapts ): JasperException: R( /adapts +
/Register.js
p + null) Unable to compile class for
JSPD:\Apache\tomcat\work\localhost_8080%2F
adapts\_0002fRegister_0002ejspRegister_jsp_23.java:101: Class Collection not
fou
nd in type declaration.
                Collection col=usersecurity.home.findAll();
                ^
D:\Apache\tomcat\work\localhost_8080%2Fadapts\_0002fRegister_0002ejspRegiste
r_js
p_23.java:102: Class java.util.HashSet not found in type declaration.
                   HashSet coll=new HashSet(col);
                   ^
D:\Apache\tomcat\work\localhost_8080%2Fadapts\_0002fRegister_0002ejspRegiste
r_js
p_23.java:102: Class java.util.HashSet not found in type declaration.
                   HashSet coll=new HashSet(col);
                                    ^
3 errors

//HERE IS JSP CODE.
<%@page contentType="text/html"%>
<%@page import="java.util.*"%>
<jsp:useBean id="usersecurity" scope="session" class="UserSecurityDataBean"
/> 



<!-- HTML FORM -->
<html>
 <head>
  <title>Register</title>
 </head>

<BODY>

<form method="POST" action="Validate.jsp";"target="Main">

          <td><select SIZE="1" NAME="wing"> <option></option>

<%
   Collection col=usersecurity.home.findAll();//THIS IS MY JAVABEAN WHICH
ACCESSES AN ENTITY BEAN
   HashSet coll=new HashSet(col);
   Iterator iterator = coll.iterator();
   while(iterator.hasNext())
{%>
        
<option
value=<%usersecurity.getWING();%>"><%usersecurity.getWING()%></option>
<%}%>

</td>

-----Original Message-----
From: Nicolai P Guba [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 17, 2001 12:58 PM
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Collection implementation


[EMAIL PROTECTED] writes:

> I know this is not really jboss related, but rather java in general
> but I thought I would try.  I have an ejb(cmp) , it has a: public
> Collection findAll() method. I havent used the Collection class so I
> cantfigure out how to implement this .  I am trying to populate a
> dropdown box on a jsp page with this collection.  If anyone knows
> where some Collection examples are online I would appreciate
> it. Ihave looked through several Enterprise java books with no luck.
> Thanks,Graham

        Collection collection  = homeInterface.findAll();
        ArrayList someListData = new ArrayList (collection);

-- 
  Nicolai P Guba    http://www.gnu.org         http://www.frontwire.com
                    mailto:[EMAIL PROTECTED]     mailto:[EMAIL PROTECTED]
                    GSM: +44 (0)7909 960 751   DDI: +44 (0)20 7368 9708

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to