This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes Re directing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "Re directing" Watch "Re directing" New topic

Re directing

mini mehta
Ranch Hand

Joined: Oct 22, 2000
Posts: 120
what is redirecting? Is it the way to forward the request to the other servlet or JSP. BTW I know that RequestDispatcher object can be used to forward or include a Servlet or JSP. So what is this URL redirecting?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63202

A redirect send sa message back to the browser to make a new request using the redirect URL that you provide. It is different from a forward or include in that it results in a new request which will not implicitly carry over any paramters or attributes from the original request.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Manoranjan Mishra

Joined: Jan 30, 2002
Posts: 8
Yah Mini
Its a way to forward request to another JSP or Servlet.. It is mostly used in the Despatcher model (N-tier) of the JSP.. The basic moto behind redirection is to separate the business logic from the presentation and include as less java code as possble in the presnetation layer.

Manoranjan Mishra
It is sorta covered in the JavaRanch Style Guide.
subject: Re directing
It's not a secret anymore!