struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Francisco Exposito Aguilera" <fcoexpos...@hotmail.com>
Subject html:optionsCollection problem
Date Tue, 01 Aug 2006 11:43:56 GMT
Hi,

I have a Bean:

package project.struts.General;
import java.util.ArrayList;
import java.util.Collection;
import java.io.*;

public class Prueba implements Serializable
{
    private Collection empresas=new ArrayList();

    public Collection getEmpresas()
    {
        empresas.add("string1");
        empresas.add("string2");
        return(empresas);
    }
}

and a jsp where I write:

<jsp:useBean id="test" class="project.struts.General.Prueba" />
<html:select property="toSelect">
    <html:optionsCollection property="empresas" name="test"/>
</html:select>

But it doesn't work. I receive the error
javax.servlet.ServletException: Cannot find bean under name 
org.apache.struts.taglib.html.BEAN

How can I solve this issue? Or what is the correct way to generate this?

Thanks in advance

_________________________________________________________________
Un amor, una aventura, compañía para un viaje. Regístrate gratis en MSN Amor 
& Amistad. http://match.msn.es/match/mt.cfm?pg=channel&tcid=162349


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message