Hmm. That does sound rather odd! Like you say, should not be like that. :-(

Only thing I can thing of here is: Is it the same session? (grasping at
straws now!)
Try println/logging the sessionId from the action and see if its still the
same as first time through.


-----Original Message-----
From: Betty Koon [mailto:[EMAIL PROTECTED]
Sent: Friday, 27 February 2004 15:39
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: Problem with loss form (session scope)


I am sorry.  I only have 1 action map to this form.  So, I guess the name
doesn't matter in this case.  Basically, what I am saying is the first time
I hit this action, the form constrctor will get called but the 2nd time the
action get called, this shouldn't happen, but it does.
Yes, that's what I am planning to do next, download the source code and
stepped through it.

-Betty

-----Original Message-----
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 26, 2004 11:18 PM
To: Struts
Subject: RE: Problem with loss form (session scope)


Ah, but you didnt actually answer my question.

Is it the same name for the form in both actions mappings, and do both these
action mappings specify the scope to be session?

My suspicion is that the problem is that struts is trying to find the form
under a different key in the second action - but is this second action
actually the same action as the first or different as I am assuming?

btw: have you gone and looked at the struts source code for the request
processor and request utils class to see what it is actually doing? (Tracing
through with a debugger can be quite enlightening). One of the common
attitudes in open source is that the source is the best reference and I
certainly found this the case when I was first learning struts :-)



-----Original Message-----
From: Betty Koon [mailto:[EMAIL PROTECTED]
Sent: Friday, 27 February 2004 15:10
To: 'Struts Users Mailing List'; [EMAIL PROTECTED]
Subject: RE: Problem with loss form (session scope)


I specify my own name in the struts config.  In my action, I just grabbed
the action form from the execute method.  And I am assumming struts fw get
that from session for me in this case, rather than creating a new one for
this request since my form is in session scope.  Is this right assumption?

-Betty

-----Original Message-----
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 26, 2004 10:59 PM
To: Struts Users Mailing List
Subject: RE: Problem with loss form (session scope)


What attribute did you set the form to be stored under?
If none will default to form name. You are storing under same attribute key
yes? Both actions mapping also defined the scope to be session?

-----Original Message-----
From: Betty Koon [mailto:[EMAIL PROTECTED]
Sent: Friday, 27 February 2004 14:51
To: 'Struts Users Mailing List'
Subject: RE: Problem with loss form (session scope)


In struts config's action definition, I set up the action to use a form in
session scope.  What I found out was, somehow the form constructor get
called the 2nd time the action get called.  To my understanding, if you set
up the form in session, the form will only get created once.  Any idea?

-Betty

-----Original Message-----
From: Niall Pemberton [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 26, 2004 9:06 PM
To: Struts Users Mailing List
Subject: Re: Problem with loss form (session scope)


Without seeing your jsp/struts-config.xml/action its a bit of a guessing
game.

I'm a bit confused by you saying "...at this point, I set up this form bean
as session scope". To me this implies your getting a form not in session
scope (i.e. request) and saving it yourself in session scope. If that is the
case - then maybe thats your problem - if the struts-config.xml says its
request, thats where struts will look for it and, if it doesn't exist, it'll
set a new one up in  request scope (even if you already have one under the
same name in session).

If I've got it wrong, then maybe you could explain further. I'm also not
clear whether your finding out your form has been 'wiped' as soon as you get
into your action and before you "set it up as session scope" or after that
when you get to your detail screen. Could you clarify that as well please.


Niall
----- Original Message -----
From: "Betty Koon" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Friday, February 27, 2004 3:41 AM
Subject: RE: Problem with loss form (session scope)


> Well, sorry for being vague.  It's a very vague problem, that's why
> it's very difficult to explain the details.  This only happen to one
> of my action.  I had a list inside a form.  And one of the column
> render a link
to
> the detail page.  But I need to do some processing before I redirect
> to
the
> detail.  So I wrote the link to do a form post it back to the caller
action.
> In that case, I can collect some information, at this point, I set up
> this form bean as session scope.  But everytime the post happened, it
> seems
like
> the form content got wiped out.
>
> -Betty



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


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



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



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



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

Reply via email to