This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes How RequestDispature actually work? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How RequestDispature actually work?" Watch "How RequestDispature actually work?" New topic
Author

How RequestDispature actually work?

Rushi Patel
Greenhorn

Joined: Sep 14, 2011
Posts: 17



in this simple example RequestDispature is INTERFACE..! "red" is reference for that , but whose instance it actually holds ???
"forward" and "include" methods are of RequestDispature interface...but where they are implemented ??? in which class ?? which class implement this interface ???

Can anyone explain this code completely ???
From beginning ...as i am newbie in this technology...!
NO PROPER BACKGROUND PROCESS IS EXPLAINED IN ANY BOOK...!

--------------------------------------------------------------------------------

Another query
------------
HttpServletRequest is also an Interface whose Ref is "request" but in that whose object / instance is held ??? object of request from client ??? is it generated by container ? while getting an request for particular servlet?

Thanks in Advance..!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60817
    
  65

The interfaces are implemented by classes defined by the container. That's the beauty of interfaces -- each container can implement them however they like, and we don't have to care.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
You mean RequestDispatcher right? If so, there are tons of information out there. Bottom line - In the case of forward, you are asking the resource that is being forwarded to to handle the request.

Rushi Patel wrote:


in this simple example RequestDispature is INTERFACE..! "red" is reference for that , but whose instance it actually holds ???
"forward" and "include" methods are of RequestDispature interface...but where they are implemented ??? in which class ?? which class implement this interface ???

Can anyone explain this code completely ???
From beginning ...as i am newbie in this technology...!
NO PROPER BACKGROUND PROCESS IS EXPLAINED IN ANY BOOK...!

--------------------------------------------------------------------------------

Another query
------------
HttpServletRequest is also an Interface whose Ref is "request" but in that whose object / instance is held ??? object of request from client ??? is it generated by container ? while getting an request for particular servlet?

Thanks in Advance..!


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1016
Suggestions: Take a look at the Servlet specification.

If you really want source code, then Tomcat implements a JSP container, and you can get the source code for that directly.

 
 
subject: How RequestDispature actually work?
 
Similar Threads
import java.sql
Question regarding a CampFire Story
Swing and security
Interfaces with method body?
Calling interface ?