I have a
JSP page that needs to have a few objects set in the request scope in order to render properly. For example my action class loads user's information from database and an object with user info is put in the request (as an attribute). The JSP then uses that object to display user info on parts of the screen.
That JSP happens to have a
struts form as well. The problem is if user entered bad input, struts validator rejects the input and then tries to re-render the JSP. But this time my action class is not called before rendering the JSP. So the objects needed to render the JSP do not exist and JSP fails to display properly.
What can I do?
Thanks