Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

program for RequestDispatcher in servlets?

Answer Posted / avinah kapoor

import javax.servlet.*;
import javax.servlet.http.*;
public class RequestDispatcherDemo extends HttpServlet
{
public void doGet(HttpServletRequest
req,HttpServletResponse res) throws ServletException
{
res.setContentType("text/html");
PrintWriter out=res.getWriter();
RequestDespatcher rd=req.getRequestDispacher("welcome");

rd.forward(req,res);//it forwart the response to
welcome servlet page but cant take resource calling page.
}
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to get the server information in a servlet?

1118


how the HTML data stored in web server?

2549


What's the difference between authentication and authorization?

1077


What is URL Encoding?

1100


What is the directory structure of web application?

924


what do you understand by url rewriting?

901


How can the session in servlet can be destroyed?

1123


What is the difference between jsp and servlet life cycle?

1175


What is the capacity the doget can send to the server?

1017


What is the servlet?

1041


How can the session in servlet be destroyed?

1101


What is the type of method for sending request from http server?

1030


If some new data has entered the database, explain how can a servlet refresh automatically?

1235


Why doesn’t a servlet include main()? How does it work?

1102


What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?

988