Win a copy of Terraform in Action this week in the Cloud forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Query regarding Response.sendRedirect

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
During response.sendRedirect, How client comes to know that it has to again make a new request. How that Information is sent to client(for making a new request). Can anybody clarify this.
 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It is the job of the developer to re-direct the browser to the new location.

At most, you can provide a link on the page where the client can click if the page doesn't get displayed automatically in, say, a few seconds.

Regards,
Saket
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you call sendRedirect the server sends two header variables that tell the client's browser what to do:

The first is a 302 (Moved Temporarily) status code.
The other is the "Location" value containing the page to which the browser is to be redirected.


[ April 11, 2005: Message edited by: Ben Souther ]
 
Ranch Hand
Posts: 225
IBM DB2 Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi i have a doubt when the user use SendRedirect(...newPage.jsp);
will the newPage.jsp will contain the data in req
Let me know the funtionality......
i mean data that we store in req while travesing the pages...

say if u have 4 pages while

page 1 ---> page2 ---> page3
due to some problem u are redirecting the client req so that req goes to new page...
while crawling the page1 thru page 3 if store data in req will i get in transfeed page
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, with sendRedirect, each page will have a new request object.
If you want to retain your objects across requests, you would need to bind them to session scope.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic