• Post Reply Bookmark Topic Watch Topic
  • New Topic

response.sendRedirect Problem

 
Anoop Krishnan
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Friends,
I am using sendRedirect method in my jsp page.I am working on Tomcat 1.3 with Apache web server
I am working as http://www.mycompany.com/site1/a.jsp & i want to forward from one of my jsp pages to
http://www.mycompany.com/site2/b.jsp
I tried with <jsp:forward > but i know that it will take only relative url.
now i tried with responce.semdRedirect(url)
were url is http://www.mycompany.com/site2/b.jsp
It is not working
Is there any way by which i can manipulate this if
url=/site2/b.jsp

 
Jayson Falkner
Author
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anoop,
You should upgrade Tomcat. The latest stable release is 3.2.2.
http://jakarta.apache.org/tomcat
That release has full support for the JSP 1.1 specs. You can then use the implicit response object to send a redirect with the following:
"response.sendRedirect("http://www.company.com/site/a.jsp")"
Becareful on spelling because the syntax matters greatly.
Jayson Falkner
jayson@jspinsider.com
P.S. Check out JSP Insider - http://www.jspinsider.com for more free JSP info!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!