Why the redirect is not working in JSP?

hello, I create a JSP page in that i used a syntax for redirect a page.Syntax is proper but that is not redirect..I have to compulsory use <jsp:forward> ...
[183 byte] By [himanshu1979] at [2007-9-26 1:15:48]
# 1

Hi himanshu1979,

<jsp:farward> is compulsary

String destination;

/* construct your destination url as you like */

this.getServletContext().getRequestDispatcher(destination).forward(request,

response);

Browser is showing ur jsp from the cache.

So you can instruct the browser not to do that by using

<code>

response.setHeader("Expires","0");

</code>

or

<code>

response.setHeader("Pragme","no-cache");

</code>

Regards,

Tirumalarao

Developer TechnicalSupport,

Sun MicroSystem,India.

rao_indts at 2007-6-29 0:42:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
use sendRedirect method in response object.response.sendRedirect("/index.jsp");
punslappy at 2007-6-29 0:42:42 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...