Hi,
I have read about the Setup/Submit pattern,
and I found out it was interesting.
I understand how to apply it for one JSP page.
But I made a layout, so I have a set of jsp pages for one webpage :
header.jsp, footer.jsp, menu_left.jsp, menu_top.jsp, content_index.jsp, ...
So for example to display the index webpage,
I need to setup the header.jsp, the menu_left.jsp, ...
public class SetupIndex extends Action {
public ActionForward execute(
ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse
response)
throws Exception {
// setup header.jsp
// setup menu_left.jsp
// setup index content
// ...
}
}
But to setup the subscription webpage, I will have redundant code, because
he has the same layout as index webpage
public class SetupSubscription extends Action {
public ActionForward execute(
ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse
response)
throws Exception {
// setup header.jsp
// setup menu_left.jsp
// setup subscription content
// ...
}
}
Any help would be appreciated, thank u.