You can also use:

RequestDispatcher rd =
getServletContext().getRequestDispatcher("/index.jsp");

... something something, code code, something ...

rd.forward(request, response);


Greg


-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
Christopher Doyle
Sent: Tuesday, August 27, 2002 2:19 PM
To: [EMAIL PROTECTED]
Subject: response.sendRedirect


Hi all--

I have this problem using the response.sendRedirect method. I've used the
method and it works fine on Tomcat 3.2, but when I switched to Tomcat 4.0.4
I started to receive IllegalStateException errors when my servlet tried to
process the response.sendRedirect method. Has anyone else had similar
problems? Or know of another way to call a JSP page from within a servlet
(without rewriting the entire page)?

response.sendRedirect(http://localhost:1964/BookNook/index.jsp);

nor

response.sendRedirect(http://localhost:1964/BookNook/index.jsp);

seem to work anymore...


Thanks

Chris
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to