File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
forum!
JavaRanch
»
Java Forums
»
Frameworks
»
Struts
Author
2 actions, same form class different instance?
mark smith
Ranch Hand
Joined: Apr 05, 2005
Posts: 240
posted
Jul 22, 2010 08:19:26
0
hi
i have actions in struts-config.xml
first one
<action path="projet" type="fr.demo.ProjetAction" validate="true" name="projetForm" input="page.demoProjet" parameter="method" scope="request"> <forward name="success" path="page.demoProjet"/> </action>
the second
<action path="dossier" type="fr.demo.DossierAction" validate="true" name="dossierForm" input="page.demoDossier" parameter="method" scope="request"> <forward name="success" path="page.demoDossier"/> </action>
for the form-bean
<form-bean name="projetForm" type="fr.demo.ProjetForm" /> <form-bean name="dossierForm" type="fr.demo.ProjetForm" />
so both the same class
if i use same form name (projetForm) in the action
does both action will use the same instance of the class?
David Newton
Author
Rancher
Joined: Sep 29, 2008
Posts: 12617
I like...
posted
Jul 22, 2010 08:53:52
0
No; you've scoped them as request.
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: 2 actions, same form class different instance?
Similar Threads
Doubt regarding action class
Server-side validation causing bean data to vanish.
Godaddy - Struts Tiles Problems
Different INPUT.jsp in DispatchAction
problem in getting data from request
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter