Rajat Nayer wrote:
> To further the qury, I am looking for the implementation of these
> methods. Where can I find them??
> An example is "req.getSession();". The method body of getSession() is
> what I am looking for.
> Hope somebody can lead me to these method implementation...
>
You will want the source code of a servlet engine to find implementations of
these methods. Source for most commercial servlet engines is not generally
available, but there are several open source servlet engines around on the
Internet. Check out:
Acme Web Server (don't know a URL for this one)
Apache JServ (http://java.apache.org)
Jetty (http://www.mortbay.com)
Jigsaw (http://www.w3.org)
(I'm sure there are others that I am not familiar with.)
You will find that the implementation of methods like getSession() will vary
between servlet engines, because they depend on other internal details of the
servlet engine involved. Thus, you won't just be able to extract the method
implementation of something like getSession() and expect it to work outside the
servlet engine you got it from.
Remember, you do not need to worry about creating implementations of these
classes -- that is the servlet engine's job. The servlet engine creates
objects (using its own internal implementations of the HttpServletRequest and
HttpServletResponse interfaces), and passes them to the service() method of
your servlet. All you need to provide is the servlet itself.
Reviewing the source of a servlet engine, though, is a good exercise in
understanding how a moderately complex Java application is put together.
>
> Another query, Does the src folder have all the source code that is
> there is the JSDK.JAR??
>
It's not obvious what "src" folder you are talking about, but the one that
comes with the JSDK 2.0, for example, does *not* include sources to everything
in the JSDK. It only includes sources for the servlet API interfaces and
classes (javax.servlet.* and javax.servlet.http.*) -- not the Sun-specific
classes that implement the servlet runner, for example.
> Thanks,
> Rajat
>
Craig McClanahan
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html