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"
                    type="de.adesso.aproda.forms.MitarbeiterAuswahlForm"/>

    <action    path="/mitarbeiterauswahlShow"
               type="de.adesso.aproda.actions.MitarbeiterauswahlShowAction"
               name="mitarbeiterAuswahlForm"
               scope="session"
               parameter="method">
      <forward name="show"                 path="/mitarbeiterauswahl.jsp"/>
    </action>

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
jsp:

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

I added this line:
    request.setAttribute("mitarbeiterAuswahlForm",mitarbeiterAuswahlForm);
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
="mitarbeiter"/>
<html:select styleClass="textbox" size="1" tabindex="3" property
="mitarbeiterID">
<html:options collection="mitarbeiterListe" property="id" labelProperty
="name" />
</html:select>



Thanks for any help!!!

Tobias



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to