To solve page composition problems, you might want to have a look at a
product like Tiles, or even SiteMesh. Tiles works quite well with
Struts Action, and there's a lot of documentation about how to use it.

* http://www.laliluna.de/first-steps-struts-tiles-tutorial.html
* http://www.learntechnology.net/sitemesh.do
* http://www.oracle.com/technology/oramag/oracle/04-may/o34dev_struts.html
* http://www.onjava.com/pub/a/onjava/excerpt/progjakstruts_14/index1.html
* http://www.developer.com/java/ent/article.php/2192411

SiteMesh works well with Struts Action, as well as a lot of other products.

* http://today.java.net/pub/a/today/2004/03/11/sitemesh.html
* http://www.onjava.com/pub/a/onjava/2004/09/22/sitemesh.html
* http://www.opensymphony.com/sitemesh/

It will take a little more tile to "ramp up" using either of these
products instead of jsp:includes, but the payoff in the end is well
worth the effort.

If you are new to  Apache Struts,  please review our latest FAQs, to
be sure that you get started "on the right foot".

* http://struts.apache.org/kickstart.html

HTH, Ted.


On 4/8/06, 王曾wang_zeng <[EMAIL PROTECTED]> wrote:
>      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.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to