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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1216


What is the purpose of dispatcherservlet properties?

1014


Describe some assignments that are executed by servlet container?

1029


What is called servlet container?

1035


Why servlet is mostly used?

1184


Why is servlet used?

1122


What are the life cycle methods of a servlet?

986


What is setattribute in servlet?

1061


How servlets are deployed in java?

964


Can servlet have a constructor ?

998


How many servlet objects are created?

1009


A client sends requests to two different web components. Both of the components access the session. Will they end up using the same session object or different session ?

1025


What is the disadvantage of cookies?

949


How do you create a cookie using servlet?

1093


What are different Authentication options available in Servlets.

1008