struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tobias Flohre" <>
Subject cannot find bean error
Date Sun, 22 Dec 2002 14:08:51 GMT
Hello everybody,

I have a serious problem, I already looked up all the list but didn't get
any information helping me to solve it. I am new to struts, so maybe it is
a simple thing, please take a look!

I have an action mitarbeiterAuswahlShow filling a form bean
MitarbeiterAuswahlForm, here the parts of the struts-config.xml:

    <form-bean      name="mitarbeiterAuswahlForm"

    <action    path="/mitarbeiterauswahlShow"
      <forward name="show"                 path="/mitarbeiterauswahl.jsp"/>

When the action is called, the code is processed (i have some
system.out.println in the action class, it looks good there). The server
tells me this:

2002-12-22 02:37:13 - path="" :action:  Storing instance under attribute
'mitarbeiterAuswahlForm' in scope 'session'

which sounds pretty good to me, too.
But when I want to access mitarbeiterauswahlForm in the jsp, I get this:

javax.servlet.ServletException: Cannot find bean mitarbeiterAuswahlForm in
scope session

What are possible reasons for this??

For further information I add some snippets from the action class and the

    MitarbeiterAuswahlForm mitarbeiterAuswahlForm
= (MitarbeiterAuswahlForm)form;
    mitarbeiterAuswahlForm.setMitarbeiter (mitarbeiter);
    mitarbeiterAuswahlForm.setStudenten (studenten);
    return mapping.findForward("show");

I added this line:
in the action class, but it is not necessary to do this by myself, right?
struts should put in the scope, no?

and the jsp:
<bean:define id="mitarbeiterListe" name="mitarbeiterAuswahlForm" property
<html:select styleClass="textbox" size="1" tabindex="3" property
<html:options collection="mitarbeiterListe" property="id" labelProperty
="name" />

Thanks for any help!!!


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message