• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Request,Response object creation?

 
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends i'm new to servlets..
As we know HttpRequest and HttpResponse object are created by the web containers(Containers) .as these two are interface how the container will create object for them if so there is there any class provided by the container which implements HttpRequest and HttpResponse ...please give me a clear picture of this issue.....
 
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes santhosh,
HttpRequest and HttpResponse is an interfaces.
But servlet container will implement that interfaces & create concrete classes.
when we say object of HttpRequest and HttpResponse this that means object of that concrete classes.
we do not need to care about that classes servlet container take care of all that thing.

If you want to see implementation then you need to look in source of any servlet container.
Hope this will Help.
 
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, the container includes classes that implement those interfaces. If you download the container's source code you should be able to find those easily by searching for something like "implements HttpServletRequest".
 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can get source HERE
 
santhosh.R gowda
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please tell me in which class it is implemented in container source code
 
Ulf Dittmer
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Even if we wanted to tell you, we couldn't, because we don't know which container you're using. Do you know how to search through multiple files for a particular phrase, like the one I suggested in my previous post? ShowSomeEffort
 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That are HttpServletRequestWrapper & HttpServletResponseWrapper for tomcat 5.5.27.


you can find them at <dir>\apache-tomcat-5.5.27-src\apache-tomcat-5.5.27-src\servletapi\jsr154\src\share\javax\servlet\http
 
santhosh.R gowda
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

HttpServletRequestWrapper extends ServletRequestWrapper
implements HttpServletRequest


I'm using tomcat container where HttpServletRequestWrapper implements HttpServletRequest interface but i could not find the class which extends HttpServletRequestWrapper and HttpServletResponseWrapper
 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HttpServletRequestWrapper & HttpServletResponseWrapper these are concrete classes,
these class's object is created by container.

 
santhosh.R gowda
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much.....
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic