• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

response.sendRedirect Problem

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Author
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
A lot of people cry when they cut onions. The trick is not to form an emotional bond. This tiny ad told me:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic