Help with multiple dynamic content on one page

D

drinc2much

Im not sure what direction to go here. I am writing a page that is
supposed to have lots of different dynamic content on the page. I
thought that I would be able to just include my struts servlets in
multiple locations, but as I found out, this does not work.

In my index.jsp I would have something like:
<jsp:include page="top.jsp"/>
<jsp:include page="servlet1.do"/>
<jsp:include page="servlet2.do"/>
<jsp:include page="bottom.jsp"/>

And then the struts application would place in the resulting jsp page
from the
<forward> declaration in my struts-config.xml file into this spot on
the index.jsp page.This works just fine if I include only 1 servlet on
the page. More than one and I get an error saying that you cannot
forward after the response has been committed.

What can I do to make this work? Is tiles the answer? Can somone point
me to some documentation for something like this?

Thanks a lot!

Chris
 
S

Sudsy

drinc2much said:
Im not sure what direction to go here. I am writing a page that is
supposed to have lots of different dynamic content on the page. I
thought that I would be able to just include my struts servlets in
multiple locations, but as I found out, this does not work.

In my index.jsp I would have something like:
<jsp:include page="top.jsp"/>
<jsp:include page="servlet1.do"/>
<jsp:include page="servlet2.do"/>
<jsp:include page="bottom.jsp"/>
<snip>

You might want to check this out:

<http://jakarta.apache.org/struts/userGuide/struts-bean.html#include>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top