struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Markert <>
Subject Re[4]: Form bean is not stored in request
Date Mon, 07 Jul 2003 10:42:53 GMT
Hello Nadja,



NS> Hello again,

>>Do you need the above line for some good reason. If not, drop it.

NS> I deleted the attribute line. Stupid easy-struts is still telling me that
NS> attribute=suchen but I can't find the line the struts-config.xml anymore. I
NS> have that line in all my action mappings (for forms anyway), it never did
NS> anything... Why shouldn't I have the line in there?

NS> Still things seem to be behave oddly... Here's the logging (with comments
NS> from me) I don't quite understand what is going on anymore...

NS> 1) Looking for ActionForm bean instance in scope 'request' under attribute
NS> key 'suchen'
NS> 2) Creating new ActionForm instance of type 'de.zmnh.struts.form.SuchenForm'

NS> This is the first call to the form, it correctly creates a new instance.

NS> Then comes some general struts initialisation. Next 16 lines are from my
NS> own debugging info for the dropdown in my form and then follows some more
NS> struts message initialisations and such. All these are not really of
NS> consequence here, so I deleted them.

NS> Then after info in entered into the form and submit is pressed:

Attention. Here the new request starts!

NS> 3) Get module name for path /
NS> 4) Module name found: default
NS> 5) Processing a 'POST' for path '/suchen'
NS> 6) Looking for ActionForm bean instance in scope 'request' under attribute
NS> key 'suchen'
NS> 7) Creating new ActionForm instance of type 'de.zmnh.struts.form.SuchenForm'
8)  -->> de.zmnh.struts.form.SuchenForm@3acc67

NS> As you can see, the form bean is stil being looked for even though I
NS> deleted that line.
That's okay. Its only the debugging info beeing not quite correct.
So far, everything looks okay to me.

NS> Maybe, it's easy-struts messing things up but I checked
NS> the code the line is not there anymore...
NS> (mapping: <action
NS>             input="/index.jsp"
NS>             name="suchen"
NS>             path="/suchen"
NS>             scope="request"
NS>             type="de.zmnh.struts.action.SuchenAction" />
NS> Tried switching to session, no change...)

NS> 9) Storing ActionForm bean instance in scope 'request' under attribute key
NS> 'suchen'

NS> Now, it created a new one and stores this one in the request right away...
NS> Why?
Because it is supposed to create a new form. We are dealing with a new
request, aren't we? This new request is missing the form bean named

NS> 10) Populating bean properties from this request

NS> It can't. The data of the form is gone...

NS> 11) BeanUtils.populate(de.zmnh.struts.form.SuchenForm@3acc67,
NS> {field(searchfield1)=[Ljava.lang.String;@41a12f,
NS> submit=[Ljava.lang.String;@bd4e3c,
NS> parameter(searchparam1)=[Ljava.lang.String;@5b78cf})
NS> 12) setProperty(de.zmnh.struts.form.SuchenForm@3acc67, field(searchfield1),
NS> [string_Geraet.Hersteller])
NS> 13) Skipping read-only property

NS> I don't have a ready-only property in the form... Not that I know of
NS> anyway. I have one in the next page, that should be displayed when all this
NS> works, but not here...

NS> 14) setProperty(de.zmnh.struts.form.SuchenForm@3acc67, submit, [Suchen])
NS> DEBUG 2003-07-07 12:13:44,519 [HttpProcessor[8080][3]] (
NS> org.apache.commons.beanutils.BeanUtils -
NS> setProperty(de.zmnh.struts.form.SuchenForm@3acc67, parameter(searchparam1),
NS> [HP])
NS> 15) Skipping read-only property
NS> 16) Validating input form properties
NS> 17) No errors detected, accepting input
NS> 18) Looking for Action instance for class de.zmnh.struts.action.SuchenAction
NS> 19) Creating new Action instance

NS> The next two line are from a bean created in my Action class, that does a
NS> few things with the data it shoudl be getting from my form. I have added
NS> one line telling me the size of one of the maps that are stored in my form
NS> bean and get passed to the this SearchSupportBean but since a new form bean
NS> was created the size of this map is of course zero...

NS> 20) SearchSupportBean.createNew()
NS> 21) Fields size: 0

NS> Any ideas? I know, I don't have any anymore... Completely confused now...
NS> Thanks for the help so far.

NS> Greetings,
NS> Nadja

NS> ---------------------------------------------------------------------
NS> Nadja  Senoucci
NS> Universitaet Hamburg
NS> Zentrum für Molekulare Neurobiologie
NS> Service-Gruppe EDV
NS> Falkenried 94
NS> 20251 Hamburg
NS> Germany
NS> Tel.:040 - 428 - 03 - 6619
NS> Fax.:040 - 428 - 03 - 6621

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


+------- Quality leads ---------------------------------------+
| Dirk Markert            |
| Dr. Markert Softwaretechnik AG                              |
| Joseph-von-Fraunhofer-Str. 20                               |
| 44227 Dortmund                                              |
+---------------------------------->>>>>>> to success! <<<<<<-+

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

View raw message