• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

sendRedirect() happens at client side or at the server side

 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

HFSJ wrote:A request dispatch happens on the server, while a redirect happens on the client


Isn't both the methods used in the servlet? Then both should happen at server side right?
Or did i misunderstood what is client/server side?
 
Ranch Hand
Posts: 453
Google Web Toolkit Hibernate Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

sony agrwal wrote:

HFSJ wrote:A request dispatch happens on the server, while a redirect happens on the client


Isn't both the methods used in the servlet? Then both should happen at server side right?
Or did i misunderstood what is client/server side?



i think yes you have misunderstood it.by client side or server side you can think here as the entity who is doing the job of redirection.

RequestDispatcher is done by the server. its the server who dispatches the request and response object to the specified url or address.
sendRedirect compels the browser to send a new request to the url specified in the redirect. hence it is done on the client side.

also you can check the final url in the browser. if it is done on the server side the url will be the same but in case of client side it will be different.

avi sinha
 
Sony Agrawal
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

avi sinha wrote: the entity who is doing the job of redirection.


I think this cleared my doubt
 
Sheriff
Posts: 9707
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This question is in the FAQ here...
 
On my planet I'm considered quite beautiful. Thanks to the poetry in this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic