<FORM> <TABLE> Some data coming from database </TABLE> </FORM>
When i did this and deployed my application and viewd Page1.jsp in the Internet Explorer I was able to see the contents of Page1.jsp and not Page2.jsp. However, when I viewed the page source of Page1.jsp from the browser it contains the source of Page2.jsp along with data coming from the database.
I think the problem is with your HTML. If your code for the table was in fact just as you've shown, you might not get to see the data. That's probably why you could see it in the source but it wasn't rendered by the browser.
Remember, <table> should have <tr> and that should have <td> which should hold the actual data. Anywhere else, and you might see nothing!
The actual code of Page2.jsp is having a lots of <TR> and <TD> inside the table tag which is holding the data coming from database I just skipped it in this forum.
And, in Page1.jsp the code "<TR><TD>********</TD></TR>" is nothing but <TR><TD></TD></TR>, I just starred it because to attract the attaintion of the ranchers as I had kept <jsp:include> there to make Page1.jsp to display the contents of Page2.jsp.
and if you need some more clarification on the code, most welcome.
My question is:-
When I kept my <jsp:include> out of the </TD>,</TR>,</TABLE></FORM> in Page1.jsp I was not able to see the display of Page2.jsp although the source was included (what's wrong here?), but when I put <jsp:include> inside </TD>,</TR>,</TABLE></FORM> in Page1.jsp I got the display (Why not in the former case?)
If you are able to view the expected source code but only have a problem with the display, that suggests that there is a problem rendering your page. Especially since you've only moved the <jsp:include> a little higher into some template text; it doesn't affect the execution in anyway.
I can't think of anything else. If you posted the actual code for page, ( without all your data of course, maybe only one or two rows ), that might help. Also, try viewing it with another browser, that might help see if this is actually the cause.