dcsimg
form = null? Why?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Aad_Nales
Posted On:   Monday, May 20, 2002 01:47 PM

Hi, I am puzzled by the following problem: I have created two struts actions, the form that comes with it and the JSP. The flow is as follows: Action 1 (create the form and put it in session scope) JSP (uses the form successfully) Action 2 The problem is in Action 2. The form parameter is null. However if I query the session like: .session.getAttribute(mapping.getAttribute()) and i look for the scope mapping.getScope(). Both of the results are in synch with expectations. What I am wondering about is: How can the form parameter be null? Any help is greatly appreciated.    More>>

Hi,



I am puzzled by the following problem: I have created two struts actions,
the form that comes with it and the JSP. The flow is as follows:



Action 1 (create the form and put it in session scope)

JSP (uses the form successfully)

Action 2


The problem is in Action 2. The form parameter is null. However if I query the
session like:


.session.getAttribute(mapping.getAttribute()) and i look for the scope
mapping.getScope(). Both of the results are in synch with expectations.


What I am wondering about is: How can the form parameter be null?


Any help is greatly appreciated.

   <<Less

Re: form = null? Why?

Posted By:   Aad_Nales  
Posted On:   Tuesday, May 21, 2002 11:04 AM

Pretty pathetic to answer my own question but since I found it and I bother you with
my question I my as well post the answer. Found after a good nights rest:


In Action 1 I created the form and put it in the right session.attribute In the JSP
I used this Form and it performed perfectly.

What I found was a misspelling the struts-config.xml . The form classnae was misspelled.
Since I place the right typei in the session all worked. It was only when I
returned a value to Actoin 2 that somehting went wrong (I have not yet checkd the source
of the action servlet.. but anyway).

I do still find it somewhat disturbing that this did not result in any run time errors.
About | Sitemap | Contact