I am developing a web site, and my work is based on the prototype already made by people who are in charge of designing UI. All my work start from the point when I get these 11 beautifully designed but static pages, and my task is to make them dynamic and have real meaning. To achive this goal,I use "<jsp:include>" tag in these static pages to include the url of the page which has some function that fetch data from database and fomat them properly. codes are as follow: ********************************************************* -------index.jsp--------- //some static parts <jsp:include page="getprojects.do" />
-------GetProjectsAction.class----- //... //fetch data from database //encapsulation into beans //put beans into request return mapping.findForward("sucess"); //... -------projectsbox.jsp(sucess)------- //read beans in request //formating the data **************************************************** But these codes will result an exception caused by "the response has commitded". So I made some change to the codes.Modified codes are as follow: ************************************************ -------index.jsp--------- //some static parts <jsp:include page="projectsbox.jsp" /> -------projectsbox.jsp------- <jsp:include page="getprojects.do" /> //read beans in request //formating the data -------GetProjectsAction.class----- //... //fetch data from database //encapsulation into beans //put beans into request return null; **************************************** Then,they works.If anybody can know what I mean,please try to explain the reason to me,and I'll really appreciate your replay.