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...


What is the difference between callling a RequestDispatcher
using ServletRequest and ServletContext?

Answers were Sorted based on User's Feedback



What is the difference between callling a RequestDispatcher using ServletRequest and ServletContext..

Answer / mahesh

We can give relative URL when we use ServletRequest and not
while using ServletContext.

Is This Answer Correct ?    7 Yes 0 No

What is the difference between callling a RequestDispatcher using ServletRequest and ServletContext..

Answer / prachetash

RequestDispatcher rd = request.getRequestDispatcher("result.jsp")

This is relative path, becoz there is no "/" slash.Container looks in same logical path.

RequestDispatcher rd = getServletContext.getRequestDispatcher("/result.jsp")

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Servlets Interview Questions

What is the difference between Difference between doGet() and doPost()?

0 Answers  


Explain jsessionid?

0 Answers  


What are the differences between the servletconfig interface and the servletcontext interface?

0 Answers  


Can we use threads in Servlets?

0 Answers  


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

0 Answers  


What compiler do not do if we create our own constructor?

5 Answers   HCL,


what is servlet life cycle?

3 Answers   Inforica,


What is cgi and what are its drawbacks?

0 Answers  


What exactly are the functions of servlet?

0 Answers  


What is the use of attribute in servlets?

0 Answers  


How can the session in servlet can be destroyed?

0 Answers  


When Servlet is unloaded?

0 Answers  


Categories