response.sendRedirect problem

Hi

I have 2 jsp pages.First page simply builds the table and after it via <jsp:include> it includes the second one.When i am trying to make response.sendRedirect from second page i am getting the following error:

javax.servlet.ServletException: Response has already been committed

Its becouse in the first page some HTML has been already sent to client.

I cannt change this page,so is there any solution for this problem?

Thank

Yulian

[490 byte] By [yulian_o] at [2007-9-27 14:52:09]
# 1
The solution is to take care of any redirects before you write html to the output stream.
beattris at 2007-7-5 22:52:14 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Just use "JavaScript"//////////////////////////////////////<script> location.href="(URL, where you want to move)"</script>//////////////////////////////////////
davidky at 2007-7-5 22:52:14 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
try using the following instead.<%@ include file="file.jsp" %>Hope this helps! Good luck!
val04 at 2007-7-5 22:52:14 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...