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 filter? Can filter be used as request or response?

1 Answers  


What is Single Threaded Model in Servlets? Explain this with an example?

10 Answers   Wipro,


Is it possible to send a mail from a servlet? Explain?

4 Answers  


What are different Authentication options available in Servlets.

0 Answers  


What are the kinds of http requests?

0 Answers  


How will you open a new page after certain interval of time (5 sec), on clicking of a button in an html page?

2 Answers  


What is SingleThreadModel interface?

0 Answers  


Why filter is used in servlet?

0 Answers  


What are the phases of servlet life cycle?

0 Answers  


How do you invoke a Servlet? What is the difference between doPost method and doGet method?

0 Answers  


What if you need to span your transaction across multiple servlet invocations?

0 Answers  


Does servlet have main method?

0 Answers  


Categories