I have an application that does a create and edit of a Business object using JSPs. What is the best practice, separate the content into two separate JSPs, or one single JSP assuming the forms to be submitted are identical?
With separate JSPs, on the create, I would not need to check whether the object to fill out the text fields and selected combo boxes etc is existent in the scope?
For example, on an edit, I do the following:
request.setAttribute("user", userObject);
then in the page, I would use JSTL to display the contents. However, on a new, the user object would not be in the request scope, so in the JSP I would need to keep checking if the user exists or not.
Thanks.