ServletRequest and ServletResponse are the Interfaces and we can not create objects of interfaces, then why we call request and response are the objects ?
Printable View
ServletRequest and ServletResponse are the Interfaces and we can not create objects of interfaces, then why we call request and response are the objects ?
[QUOTE=rasaya;11125]ServletRequest and ServletResponse are the Interfaces and we can not create objects of interfaces, then why we call request and response are the objects ?[/QUOTE]
hi rasaya,
it is true that ServletRequest and ServletResponse are the Interfaces.
but these interface implemented by web server, when we use objects of ServletRequest and ServletResponse means these objects send us by server.
we never create object for these
Anil Mishra
We know that ServletRequest and ServletResponse are interfaces but the web container takes responsibility of creating objects for these interfaces and this is done by the code which implements these interfaces.
hi
here request and response r not objects ..we're using request and response as reference variables...