You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dirk Markert <di...@dr-markert.de> on 2003/07/10 13:15:30 UTC
Re[2]: What is the default scope of an ActionForm.
Hello Ravi,
default is SESSION.
***************************************************************
RG> I've tried this with my and used the same for at more than 1 screen but what happens is that whenever it the property name is same as that already used in previous screen it automaticaly
RG> populates that portion of the screen
RG> -----Original Message-----
RG> From: Shashank Dixit [mailto:Shashank_Dixit@datamatics.com]
RG> Sent: Thursday, July 10, 2003 4:28 PM
RG> To: Struts Users Mailing List
RG> Subject: Re: What is the default scope of an ActionForm.
RG> The default scope is REQUEST
RG> ----- Original Message -----
RG> From: "Ravi Garg" <Ra...@infosys.com>
RG> To: <st...@jakarta.apache.org>
RG> Sent: Thursday, July 10, 2003 4:19 PM
RG> Subject: What is the default scope of an ActionForm.
>> Hi all,
>> can any of you tell me if I donnot specify any scope of Form in
RG> Struts-config.xml then for which scope does the instance of form persists??
>>
>> For example:
>> <action-mappings>
>> <action path="/testing"
>> type="test.action.TestingAction"
>> name="TestingForm"
>> input="/jsp/Testing.jsp">
>> <forward name="success" path="/jsp/Test.jsp"/>
>> <forward name="invalid" path="/jsp/Testing.jsp"/>
>> </action>
>> </action-mappings>
>>
>> What will be the scope of "TestingForm"?
>>
>> Regards,
>> Ravi
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
RG> ---------------------------------------------------------------------
RG> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
RG> For additional commands, e-mail: struts-user-help@jakarta.apache.org
RG> ---------------------------------------------------------------------
RG> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
RG> For additional commands, e-mail: struts-user-help@jakarta.apache.org
Regards,
Dirk
+------- Quality leads ---------------------------------------+
| Dirk Markert dirk.markert@dr-markert.de |
| Dr. Markert Softwaretechnik AG |
| Joseph-von-Fraunhofer-Str. 20 |
| 44227 Dortmund |
+---------------------------------->>>>>>> to success! <<<<<<-+
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re[2]: What is the default scope of an ActionForm.
Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Thu, 10 Jul 2003, Dirk Markert wrote:
> Date: Thu, 10 Jul 2003 13:15:30 +0200
> From: Dirk Markert <di...@dr-markert.de>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>,
> Dr. Dirk Markert <di...@dr-markert.de>
> To: Struts Users Mailing List <st...@jakarta.apache.org>
> Subject: Re[2]: What is the default scope of an ActionForm.
>
> Hello Ravi,
>
> default is SESSION.
It does indeed default to SESSION. Even though REQUEST would have been
better, the original default (way back in the Struts 0.5 days) was
session, and it would have broken backwards compatibility to change this.
My advice is to always be explicit in your <action> elements.
Craig
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: Re[2]: What is the default scope of an ActionForm.
Posted by Mark Lowe <ma...@talk21.com>.
I'm not sure whether it defaults to session, I was under the impression
it was scoped to the request, but as i pretty much always define the
scope i wouldn't know.
However when you scope to request the same can happen if redirect is
set to false, as the action isn't a new request as such.. My guess is
that if you set redirect to true this will fix your problem..
Cheers mark
On Thursday, July 10, 2003, at 12:15 PM, Dirk Markert wrote:
> Hello Ravi,
>
> default is SESSION.
>
> ***************************************************************
>
> RG> I've tried this with my and used the same for at more than 1
> screen but what happens is that whenever it the property name is same
> as that already used in previous screen it automaticaly
> RG> populates that portion of the screen
>
> RG> -----Original Message-----
> RG> From: Shashank Dixit [mailto:Shashank_Dixit@datamatics.com]
> RG> Sent: Thursday, July 10, 2003 4:28 PM
> RG> To: Struts Users Mailing List
> RG> Subject: Re: What is the default scope of an ActionForm.
>
>
> RG> The default scope is REQUEST
>
>
> RG> ----- Original Message -----
> RG> From: "Ravi Garg" <Ra...@infosys.com>
> RG> To: <st...@jakarta.apache.org>
> RG> Sent: Thursday, July 10, 2003 4:19 PM
> RG> Subject: What is the default scope of an ActionForm.
>
>
>>> Hi all,
>>> can any of you tell me if I donnot specify any scope of Form in
> RG> Struts-config.xml then for which scope does the instance of form
> persists??
>>>
>>> For example:
>>> <action-mappings>
>>> <action path="/testing"
>>> type="test.action.TestingAction"
>>> name="TestingForm"
>>> input="/jsp/Testing.jsp">
>>> <forward name="success" path="/jsp/Test.jsp"/>
>>> <forward name="invalid" path="/jsp/Testing.jsp"/>
>>> </action>
>>> </action-mappings>
>>>
>>> What will be the scope of "TestingForm"?
>>>
>>> Regards,
>>> Ravi
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> RG>
> ---------------------------------------------------------------------
> RG> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> RG> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
>
>
> RG>
> ---------------------------------------------------------------------
> RG> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> RG> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
>
>
>
> Regards,
> Dirk
>
> +------- Quality leads ---------------------------------------+
> | Dirk Markert dirk.markert@dr-markert.de |
> | Dr. Markert Softwaretechnik AG |
> | Joseph-von-Fraunhofer-Str. 20 |
> | 44227 Dortmund |
> +---------------------------------->>>>>>> to success! <<<<<<-+
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org