I have two different forms to register users and an action, form 1 is used by Users of type A and form 2 is used by Users of type B. Therefore when they get to index they will choose the form based on their type so I do not have any option to figure out their type, the only way is to receive the request and find out which form has sent the request to the action.
I need some hints on how can I find out which form has sent the request to the action.
jsp file of UserA
<s:form name="form1" action="register">
.... registration form for User A .....
</s:form>
jsp file of UserB
<s:form name="form2" action="register">
.... Registration form for User B .......
</s:form>
- please note the forms are different
action
public String Register() {
if (request is from form1)
{
.....
}
if (request is from form2)
{
....
}
}