I want initialize some form variables before I show the
jsp page.
So In my action class, I create a new PersonForm and set the initial values for required fields.
then I want to set the form in the mapping, so that wehn the jsp will show with inital values.
but when I do a
mapping.setAttribute("personForm");
it doesnt set the value and gives me an exception. In the debug mode I can see that attribute is null.
how do I set the form in the required scope?
I have tried
if ("request".equals(mapping.getScope()))
request.setAttribute(mapping.getAttribute(), personForm);
else
session.setAttribute(mapping.getAttribute(), personForm);
This doesnt give me any errors.
but still the value is not set.