• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

please help very urgent

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hai friends ,
servlets contain some interfaces like ServletResponse...by using that instance we create the printwriter instance so where these implementaion reside?...cos..Servletresponse contain only abstract methods u know..
 
Marius Holm
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That'�s where you come in...to write the implementation..
Good luck with that!
Marius
 
Kevin Mukhar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is true that ServletResponse is an interface. However, each servlet container must provide a concrete implementation of the ServletResponse and other interfaces.
For example, in the JagClient.zip library that comes with Sybase's server, there is a file named com.sybase.jaguar.servlet.JaguarResponse.class which implements HttpServletResponse.
If you look at any of the other servlet containers, you will find a similar situation. The container will provide concrete implementations of all the servlet interfaces. In your code, you declare that the references you use are of the interface type. That way, no matter what the actual concrete class is named, your servlet will work with any servlet container.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"venkatesan s",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp .
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please choose a new name which meets the requirements.
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic