I KNOW this is just a newbie question but it’ll help greatly!
I did a simple form like your sample login …
then I did a simple “New user” form and bean … and the login uses that “user”…
But then I went to do an edit user and I realized – I need a new form (jsp), and a new action but the form-bean itself can work for either new or modify, or for anything else regarding a user.
SO – what’s the proper way of doing this? The first form (newUser.jsp) currently leads to a NewUserForm and of course a NewUserAction but this layout could be changed to a UserInfoForm and a NewUserAction, then a ModUser.jsp could also point to a UserInfoForm, then a ModUserAction. SO – is this sort of thinking (reuse of various classes) kosher in the Struts process you guys are supporting here or is the best practices thinking that you should have a separate form bean for each form action (as in add, modify, delete)?
If it is kosher to reuse the formbean class, is it hard to rename it? Since EVERYTHING is currently named “NewUser” its kinda hard in the URL view to tell what name goes with what – I think the source view of the struts-config.xml is probably the easiest way to tell what I’m wanting to rename to what. Is that an acceptable way of changing a formbean name after already connecting everything up?
Thanks!